porta325 Posted June 18, 2007 Share Posted June 18, 2007 <a href="http://www.site.com" target="_blank">title</a><br>description. I simply want to get this in browser but everything i get is a link.I don't want a link, i simply want that code in the browser.Anyone ? Thx!!! Quote Link to comment Share on other sites More sharing options...
Caesar Posted June 18, 2007 Share Posted June 18, 2007 Not sure what you're asking. Do you want to echo out actual code? Is that what you're asking? Quote Link to comment Share on other sites More sharing options...
porta325 Posted June 18, 2007 Author Share Posted June 18, 2007 Yes, i want to echo a <a href= .... tag. Quote Link to comment Share on other sites More sharing options...
ShoeLace1291 Posted June 18, 2007 Share Posted June 18, 2007 echo "<a href='url'>name</a>"; Quote Link to comment Share on other sites More sharing options...
porta325 Posted June 18, 2007 Author Share Posted June 18, 2007 Not working, i have something like this echo "<a href=$url target="_blank">$title</a><br>$description"; Quote Link to comment Share on other sites More sharing options...
Caesar Posted June 18, 2007 Share Posted June 18, 2007 If you want the html code to display as HTML....and not have it parse as HTML... <?php $string = '<a href="mypage.htm">My Page</a>"; $newstr = htmlentities($string); echo $newstr; ?> Quote Link to comment Share on other sites More sharing options...
Caesar Posted June 18, 2007 Share Posted June 18, 2007 If you want the HTML to be parsed as HTML... <?php echo '<a href="mypage.htm">My Page</a>'; ?> Quote Link to comment Share on other sites More sharing options...
porta325 Posted June 18, 2007 Author Share Posted June 18, 2007 I have to study this a little, the problem could be that i have 3 variables in that echo. Quote Link to comment Share on other sites More sharing options...
DyslexicDog Posted June 18, 2007 Share Posted June 18, 2007 The problem wasn't in your php it was in your html. I believe you want to look into the <XMP> tag. I'm not really sure though as I've never used it before. Quote Link to comment Share on other sites More sharing options...
porta325 Posted June 18, 2007 Author Share Posted June 18, 2007 I guess it's all about writing HTML inside PHP. I have to study a little bit more on how they combine. Quote Link to comment Share on other sites More sharing options...
Corona4456 Posted June 18, 2007 Share Posted June 18, 2007 $htmlcode = htmlentities("<a href=$url target='_blank'>" . $title . "</a>" . $description); echo $htmlcode; Quote Link to comment Share on other sites More sharing options...
porta325 Posted June 18, 2007 Author Share Posted June 18, 2007 I think i love you...Just kidding, anyway, that alooooooot. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.