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
  1. #1
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts

    mailto array not working

    I am trying to load an agents email into the code dynamically and all i get is

    mailto:Array['email']
    what do i need to do, to make this work, or rather what am i missing?

    PHP Code:
    echo "<td><p class=\"copy_agent\"><a href=\"mailto:$agents[$i]['email']\">".$agents[$i]['email']."</a></p></td></tr>"
    thanks for any help.

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    238
    Thanks
    3
    Thanked 37 Times in 37 Posts
    You need curly braces around $agents[$i]['email'] in a double-quoted string:
    PHP Code:
    echo "<td><p class=\"copy_agent\"><a href=\"mailto:{$agents[$i]['email']}\">".$agents[$i]['email']."</a></p></td></tr>"

  • Users who have thanked SKDevelopment for this post:

    jcdevelopment (10-20-2009)

  • #3
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    as soon as i posted this, i saw thought. Thank you very much though!


  •  

    Posting Permissions

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