i have a problem. The problem is Create link to another page or directories with PHP inside HTML Page.
Here is my code
$query = $this->db->query($sql);
if ($query->num_rows() > 0){
echo '<a href="<?php echo base_url('admin/edit/'."$g->id_info")?>">Edit</a>';
} else {
echo '<a href="<?php echo base_url('admin/delete/'."$g->id_info")?>" >Delete</a>';
}
But the code is returning an error
Parse error: syntax error, unexpected 'admin' (T_STRING), expecting ',' or ';' in D:\xampp\**** on line 150
What is the correct way of embedding a href with PHP inside HTML Page??? Thanks in advance