Re: Can I have If...Else inside a For Loop???
| From: | (~~~i LeoNid ~~) | Date: | Sat, 20 Oct 2001 10:45:59 +0000 |
| Subject: | Re: Can I have If...Else inside a For Loop??? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71686@lists.php.net to get a copy of this message | ||
On Fri, 19 Oct 2001 21:46:29 -0700 impersonator of brad@techkno.com (Brad
Melendy) planted &I saw in php.general:
>AAAAaaaaarrrrrrgggghhhhh! I don't think I can say much else. Thanks so
>much for pointing that out David. ;-)
>
>.....Brad
>
>
>"David Pearson" <David@Pearson-Family.org> wrote in message
>news:003101c1591a$e00ec290$320110ac@david...
>> Could it be the semi colon at the end of the 'if' line, at '... $nChar =
>> 45); { ...' ? Looks like the if statement ends there, the ' { print
>> "OK."; } ' is a block on it's own and the 'else' is now out
>> of context.
>>
>> -----Original Message-----
>> From: Brad Melendy [mailto:brad@techkno.com]
>> Sent: Friday, October 19, 2001 8:03 PM
>> To: php-general@lists.php.net
>> Subject: [PHP] Can I have If...Else inside a For Loop???
>>
>>
>> Hi All,
>> I'm stumped. I've got the following code:
>>
>> <?php
>> if(isSet($domain))
>> {
>> for ( $counter=0; $counter <= strlen($domain); $counter++ )
>> {
>> $nChar = ord(strtolower(substr($domain, $counter, 1)));
>> if (($nChar > 47 And $nChar < 58) or ($nChar > 96 And $nChar < 123) or
>> $nChar = 45);
I'd also ^^put == here, or you NEVER get to else{ anyway