Naveed Cheema Naveed Cheema - 9 months ago 35
PHP Question

how to set value using php inside <a></a> tag

Basically, I'm trying to set the title against the value which came from DB but when I make a PHP statement in inverted commas to set title the tag got disturbed. Any Suggestions ??

echo ?>
<td><a id="bookmark-this" value= "hi" href="#" title="<?php $Institute_Code ?>" >Bookmark This Page</a><td>


You aren't printing the $Institute_Code variable

You have...

 title="<?php $Institute_Code ?>"

You need to use one of these methods

     title="<?php echo $Institute_Code; ?>"



Also, the other echo ?> will cause an error, make that just ?>