...

View Full Version : error



kamkam
09-05-2009, 09:56 AM
Hi;
My code as following have some waring, could anyone tell me how to fix it, please.


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'


echo "<a href=\"find_agent_by_name_3.php?companyname=" . $row['companyname'] . "&province_state_territories=" . '$province_state_territories' . "&city=" . '$city' "\">";
echo $row['companyname'];
echo "</a>";

FWDrew
09-05-2009, 10:04 AM
Hi;
My code as following have some waring, could anyone tell me how to fix it, please.


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'


echo "<a href=\"find_agent_by_name_3.php?companyname=" . $row['companyname'] . "&province_state_territories=" . '$province_state_territories' . "&city=" . '$city' "\">";
echo $row['companyname'];
echo "</a>";


Try this:

echo '<a href="find_agent_by_name_3.php?companyname="' . $row['companyname'] . '"&province_state_territories="' . $province_state_territories . '"&city="' . $city. '">';
echo $row['companyname'];
echo "</a>";

kamkam
09-05-2009, 10:22 AM
Thanks a lot



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum