SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [solved]echo db rows problem

    Code PHP:
      echo "<td><a href=\"mailto:" . $row['phone'] . @ . $row['carrier'] . "\">" . $row['phone'] . "</a></td>";

    the phone part is a number say 8595551234 and the carrier is something like vtext.com


    i want to combine them so it is
    8595551234@vtext.com


    and i get a Parse error: syntax error, unexpected '.'


    Thanks
    Denver

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    echo "<td><a href=\"mailto:" $row['phone'] . @ . $row['carrier'] . "\">" $row['phone'] . "</a></td>"
    try

    PHP Code:
    echo "<td><a href=\"mailto:" $row['phone'] . "@" $row['carrier'] . "\">" $row['phone'] . "</a></td>"
    I added quotes around the @ sign.

  3. #3
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks that worked!


Bookmarks

Posting Permissions

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