I’m trying to add an edit button to this table, the table is in html as is the button, the data is been taken out of phpmyadmin.
The error i get is: syntax error, unexpected token "class", expecting "," or ";" in the line before $valor[accID].
This is my code:
<?php
$data = array();
$data = popularCustomerTable();
foreach($data AS $row => $valor){
echo "<tr>
<td> "<a class= "address-book-edit btn--e-transparent-platinum-b-2"; href="dashboard-customer-edit.php">Edit</a> "</td>
<td>".$valor["accID"]."</td>
<td>".$valor["cusName"]."</td>
<td>".$valor["cusEmail"]."</td>
<td>".$valor["cPass"]."</td>
<td>".$valor["cPhone"]."</td>
<td>".$valor["cusMailAddress"]."</td>
<td>".$valor["cusBillAddress"]."</td>
<td>".$valor["cusCity"]."</td>
<td>".$valor["cusSate"]."</td>
<td>".$valor["cusCountry"]."</td>
<td>".$valor["cusZipCode"]."</td>
<td>".$valor["cusStatus"]."</td>
</tr>";
}
?>
2
Answers
try this for the quotes:
You can do it this way: