Re: if (a == b) ...
| From: | Johannes Schlueter | Date: | Thu, 30 Jan 2003 02:04:24 +0000 |
| Subject: | Re: if (a == b) ... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133580@lists.php.net to get a copy of this message | ||
On Thursday 30 January 2003 02:39, David Freeman wrote:
> -----8<-----
> $a = "0";
> $b = "Friday August 22";
> -----8<-----
>
> and resulted in 'no match'.
Or try
$a = 0;
$c = (string) $a; // Now $c == "0"
or
if (( (string) $a == (string) $b)) {
...
The manual could be your friend, too:
http://www.php.net/manual/en/language.types.type-juggling.php
johannes