I am new to web development and one thing that is driving my head mad is that I am unable to get the value for one of the values in my table.
At present this is my code:
<?php
...
if(($result->num_rows)>0){
while($row = $result->fetch_assoc()){
print
"<tr>".
"<td id='numbers' class='col-md-4 text-center'>{$row["number"]}</td>".
"<td class='col-md-1 text-center'>$row["names"]</td>".
"</tr>";
}
?>
<script type="text/javascript">
var jz = $('#numbers').val();
alert(jz);
</script>
I am using bootstrap so I am probably not setting the ID
properly for the td
tag. Nothing is being returned for the #numbers
. I don't get why
Would mean a lot if someone could help me out
Thanks