RE: [PHP] Creating a variable out of a IF statement
| From: | Ben C. | Date: | Wed, 16 Oct 2002 03:58:00 +0000 |
| Subject: | RE: [PHP] Creating a variable out of a IF statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120101@lists.php.net to get a copy of this message | ||
John, It works...thanks
-----Original Message-----
From: John W. Holmes [mailto:holmes072000@charter.net]
Sent: Tuesday, October 15, 2002 8:34 PM
To: 'Ben C.'; php-general@lists.php.net
Subject: RE: [PHP] Creating a variable out of a IF statement
> What I want to do is have an IF statement which the results would
create a
> variable. The IF statement is:
>
> IF ($car == "BMW" AND $model == "530i") echo ("Price is 35,000
dollars");
>
> I want the "Price is 35,000 dollars" to be a variable. Please help
with
> how
> to do this.
if($car == "BMW" && $modle == "530i") { $var = "Price is 35,000
dollars"; }
---John Holmes...