Re: Is $a an interger?
| From: | Matt McClanahan | Date: | Tue, 07 Nov 2000 17:22:02 +0000 |
| Subject: | Re: Is $a an interger? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24135@lists.php.net to get a copy of this message | ||
On Tue, 7 Nov 2000, Wico de Leeuw wrote:
> Just do
>
> if ($a = 1) {
> // do stuff
> } elseif ($a = "blah") {
> // do stuff
> }
>
> Read the manual about (auto) type conversion
You could even do
if ($a == 1) {
// do stuff
}
else if ($a == "blah")
{
// do stuff
}
to do comparisons, instead of assignments.
Matt