Re: using list and each with index of 0
| From: | Bojan Gajic | Date: | Sat, 23 Dec 2000 00:04:08 +0000 |
| Subject: | Re: using list and each with index of 0 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31639@lists.php.net to get a copy of this message | ||
That was answered few days ago...
since $id is integer, 'gap' is converted to integer, and 'if' returns
true...
use if($id==='gap'){....
HTH,
Bojan Gajic
Jade Ohlhauser wrote:
> my bad, it appears list and each do work with keys of 0, it was another
> error that was causing me to think that
>
> and this error is weird:
>
> basically it is I have this code:
> if ($id == 'gap') do this
> else do this
> and $id = 0 doesn't get to the else
>
> anyway everything is working, sorry to waste your time
>
> ............. Jade Ohlhauser
> [website architect]........... http://bandwidthplace.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net