Jump to content

Stop PHP Comments.... if($sponser == http://)


Mutley

Recommended Posts

I have an address I want to add into an if statement, which will be:
[code] if($sponser == http://) {
echo " "
}
else {
<a target="_blank" href="<?=$sponser?>">Click to View Website</a>
}[/code]

So if there is no website it won't show "Click to view website" but the problem is http:// creates a PHP comment which stops it from working.

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/19468-stop-php-comments-ifsponser-http/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.