1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Contantination - PHP

Discussion in 'Web Design & Development' started by knight_47, Jan 20, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. knight_47

    knight_47 Thread Starter

    Joined:
    Mar 14, 2006
    Messages:
    941
    I've been working in a new script, and I was trying to use the . in php, but had some problems.

    PHP:
    $url "<center><FONT FACE=\"sans-serif, Arial, Helvetica, Geneva\" SIZE=\"6\"><a href=\"$raw_url\" target=\"_blank\">$raw_url</a></FONT></center>";
    The above code is what I currently have implemented in one of my scripts, I would assume it would come up with an error because I'm combining php with html, but it did not.

    So what I'm asking, what would be the correct way to output that line above, with contamination, I know the above code works, but is it not recommended or does it not even matter?

    script: www.knight47.com/link_sharer

    Thanks again.
     
  2. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    Are you looking for the concatenation operator?
    PHP:
    $url '<center><FONT FACE="sans-serif, Arial, Helvetica, Geneva" SIZE="6"><a href="' $raw_url '" target="_blank">' $raw_url '</a></FONT></center>';
     
  3. knight_47

    knight_47 Thread Starter

    Joined:
    Mar 14, 2006
    Messages:
    941
    Oops concantenation, lol, I thought it was contantination.

    Yes that's what I wanted though, thanks B.
     
  4. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    [tsg=yourewelcome]yourewelcome[/tsg]
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/536900

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice