I have a problem with my PHP variable and a button which is generated using 'echo'. Now I want to insert the id of the button. How I will do that.
Please help me. Code is given below.
if ($unconfirmed_cities) {
foreach ($unconfirmed_cities as $unconfirmed_city) {
echo '<div>';
echo "$unconfirmed_city[name]";
echo '<input type="button" id= "$unconfirm_city[name]" value="Accept" class="mybut btn btn-info btn-mini" style="">';
echo '</div>';
}
}
Now as given the input type = "button"in the echo tag and I have inserted the id but it is not working.How to do this.