I am trying to append new row to my table, but some input fields got some value retrived from mysql. I know that php is executed server side and javascript client side. Help me with this.
Code that needs to be appended :
<td>
<select name="categories[]">
<?php foreach(categories() as $row){
foreach($row as $key=>$cell){
echo '<option>'.$cell.'</option>';
}
}?>
</select>
</td>
So my jquery append is the exact code above turned into a string:
SOMECODE.append('<td><select name="categories[]"><?php foreach(categories() as $row){foreach($row as $key=>$cell){echo "<option>".$cell."</option>";}}?></select></td>');
So how can i append my php code by using jquery ?