Re: If statement within a variable?
| From: | Franklin van Velthuizen | Date: | Thu, 30 Aug 2001 16:12:30 +0000 |
| Subject: | Re: If statement within a variable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65313@lists.php.net to get a copy of this message | ||
Brandon Orther wrote:
Hello, Is there a way to put an if statement in a variable? For example: $var = "Hello".IF($var2 = 1) { ."Mr. Bean". } else { ."New Comer". }." To The Coffee House."; $var = "Hello ".($var2==1 ? "Mr. Bean" : "New Comer");/franklin