Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: error

  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    306
    Thanks
    24
    Thanked 0 Times in 0 Posts

    error

    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 ';'

    PHP Code:
    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>"
    Last edited by kamkam; 09-05-2009 at 10:59 AM.

  • #2
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    Quote Originally Posted by kamkam View Post
    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 ';'

    PHP Code:
    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:
    PHP Code:
    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>"
    Dev-Tips.com || Employee at the Envato Network || My Portfolio

  • Users who have thanked FWDrew for this post:

    kamkam (09-05-2009)

  • #3
    Regular Coder
    Join Date
    Dec 2006
    Posts
    306
    Thanks
    24
    Thanked 0 Times in 0 Posts
    Thanks a lot


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •