echo a url in a new window
Posted: Tue Jan 12, 2010 2:39 pm
I've been trying to figure this out for the past few days but I can't seem to get it working. First off here is the section of code I'm working with:
echo "<td class='contact'><b>" . $row['name'] . "</b>";
echo "<br />" . $row['category'];
echo "<br />" . $row['address'];
echo "<br />" . $row['phone'];
echo "<br /><a href=" . chr(34) . $row['menu'] . chr(34) . ">Menu</a>";
echo "<br /><a href=" . chr(34) . $row['map'] . chr(34) . ">Map</a>";
/*echo "<br /><a href=" . chr(34) . $row['review'] . chr(34) . ">Reviews</a>";*/
echo "<br /><a href=" . chr(34) . $row['website'] . chr(34) . ">Website</a></td>";
echo "</tr>";
When a user click on Menu, Map or Website I would like it to open in a new window.
I've added in target="_blank" in different areas and it hasn't worked yet. I always get a parse syntax error.
Any help would be greatly appreciated.
echo "<td class='contact'><b>" . $row['name'] . "</b>";
echo "<br />" . $row['category'];
echo "<br />" . $row['address'];
echo "<br />" . $row['phone'];
echo "<br /><a href=" . chr(34) . $row['menu'] . chr(34) . ">Menu</a>";
echo "<br /><a href=" . chr(34) . $row['map'] . chr(34) . ">Map</a>";
/*echo "<br /><a href=" . chr(34) . $row['review'] . chr(34) . ">Reviews</a>";*/
echo "<br /><a href=" . chr(34) . $row['website'] . chr(34) . ">Website</a></td>";
echo "</tr>";
When a user click on Menu, Map or Website I would like it to open in a new window.
I've added in target="_blank" in different areas and it hasn't worked yet. I always get a parse syntax error.
Any help would be greatly appreciated.