I have this php-jquery-html pseudo-structure:
<table>
<?php while ($r = mysql_fetch_array($sth)){ ?>
<tr>
<td>
Some HTML tag here
</td>
</tr>
<script type="text/javascript">
// Some jQuery here
</script>
<?php } ?>
</table>
and I load this with AJAX in another page.
I’m sure that $sth has 6 rows but it displays only 1 row. If I remove <script> section it works fine.
Are we allowed to do this or I should check my syntax? (I didn’t have any syntax error though!)
This is not valid HTML markup and could therefore cause issues with your layout.
scripttags cannot be nested directly intotabletags, however you can put this into yourtdtag