Hello, I am new to the board and PHP. I created a simple store locator app with PHP. It pulls the info from a database. I want to take the website field from the table, once it is returned from the query, and have it print out a a hyperlink.
Please help.
Thanks, I have posted most of the relevant code.
<?php if (isset ($stores)) { if (!empty ($stores)) {
echo '<p><strong>' . count ($stores) . ' results were found.</strong></p>'; foreach ($stores as $value) {
echo '<p><strong>' . $value['name'] . '</strong><br />';
echo $value['address'] . '<br />';
echo $value['town'] . ', ' . $value['state'] . ' ' . $value['postal'];
echo ' <a target="_blank" href="http://maps.google.com/maps?q=',
$value['address'], ' ', $value['town'], ', ', $value['state'], ' ',
$value['postal'],'">Map this location</a><br />';
echo 'Phone: ' . $value['phone'] . '<br />';
echo 'Website: ' . $value['website'] . '<br />';
echo 'Email: ' . $value['email'] . '<br />';
echo 'Hours: ' . $value['hours'] ;
echo '</p>'; } }
else {
echo '<p><strong>No results found</strong></p>'; } }
?>