php while loop – html a href inside loop of data


This Content is from Stack Overflow. Question asked by Amphrite

I’m trying to get my while loop to function when fetching data that is equal to input field.
The Data set is functional, but I want to add a read, update and delete function to each field of data through an with allocated ID.

                        $output .="
                            <td><a href="read.php?id='. $row['id'] .'" class="mr-3" title="View Record" data-toggle="tooltip"><span class="fa fa-eye"></span></a></td>
                    $output .="</tbody>";
                    echo $output;

It outputs the following error

“Parse error: syntax error, unexpected identifier “read” in
C:xampphtdocshelloworldaction.php on line 38″

so im guessing its a syntax error in my href


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?