![]() |
If statement problem :(
Quote:
All Im trying to get it to do is still display the name, just remove the href link if no website is included in the DB :Oh crap |
Because if the condition in the if statement is false, none of the code inside the curly braces will execute.
|
Quote:
|
BTW, rather than writing
Code:
<?php echo $website; ?> Code:
<?=$website;?> |
Quote:
I was actually going to post in a few weeks to see where I could shorten some of the code I'm using on my admin system and I'm sure its over-inflated, but I need to get things finished up with it first. |
Be careful using short codes. They require an ini setting that is not always turned on. So code that works on one server may not work on another.
It can also lead to some issues when dealing with xml which also uses an <? ?> Syntax. . |
Quote:
The short echo tags <?= ... ?> are not dependent on an ini setting https://www.php.net/manual/en/langua...ax.phptags.php and there's no proposal to deprecate them. They are actually line 1 of the PSR-1 coding standard https://www.php-fig.org/psr/psr-1/ Not that anyone actually follows that... |
Quote:
Interdasting. I learn something new about every 2 minutes. Thanks for that. . |
All times are GMT -7. The time now is 04:45 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc