In my code I have
Code: Select all
<td width="100" align="center"><button type="button" onclick="listMedicallTreatments(<?php echo $row['patientl_id'];?>)">Get Treatments</button></td>
I've tried
Code: Select all
<td width="100" align="center"><button type="button" onclick="listMedicallTreatments(<?php echo $row[\'patientl_id'\];?>)">Get Treatments</button></td>And I've triedParse error: syntax error, unexpected ''patient_id\'];?>)">Get Treatme' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING)
Code: Select all
<td width="100" align="center"><button type="button" onclick="listAnimalTreatments(<?php echo $row['\patient_id\'];?>)">
I've tried multiple variations and for the life of me I cannot figure out how to format that $row[patient_d] to send the correct string to the javascript function.
thank you