problems echo variable, it show as "T" instead of the varible

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perhapscwk
    New Member
    • Sep 2007
    • 123

    problems echo variable, it show as "T" instead of the varible

    I have

    Code:
    $ad_url = "https://".$_SERVER["HTTP_HOST"]."/category.php?viewadv=".$viewadv;
    
    echo $ad_url;

    It always show as
    "http://my domainname..../category.php?vi ewadvT"

    Why?

    If I echo $viewadv, it fine, i can see the number (5), but how come if i echo $ad_url,
    then it will display as T instead of "=5"
  • zorgi
    Recognized Expert Contributor
    • Mar 2008
    • 431

    #2
    I can not reproduce your error. Basically when I do this:
    Code:
    $viewadv = 5;
    $ad_url = "https://".$_SERVER["HTTP_HOST"]."/category.php?viewadv=".$viewadv;
    echo $ad_url;
    I get https://localhost/category.php?viewadv=5 as it probably should be. Can you give us some more code. Like where/how do you assign value 5 to your $viewadv.

    Comment

    • perhapscwk
      New Member
      • Sep 2007
      • 123

      #3
      I Just find that it works fine except if I send it as a email message.

      Not sure if it affected by the email header.


      I use email header as below.
      Code:
      Content-Type: text/html; charset=iso-8859-1
      
      Content-Transfer-Encoding: quoted-printable

      Comment

      • zorgi
        Recognized Expert Contributor
        • Mar 2008
        • 431

        #4
        Hmmm... I always use phpMailer and mostly recommended on this forum is Swift Mailer. Easy to use.

        Comment

        Working...