Oops, I spoke too soon.  I wasn't getting the results I thought I was until
I used "==" instead of "=" at the very end of my IF statement.  Thanks very
much for pointing that out.

....Brad

"Brad Melendy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hmmmm..... dunno about that.  It's returning the results I'd expect as it
is
> now.  If I pass a string with characters that don't match the IF's
criteria,
> I'm getting the ELSE statement's results.  Thanks though.
>
> ....Brad
>
> "~~~I Leonid ~~" <[EMAIL PROTECTED]> wrote in message
> 3bd15547.14743496@localhost">news:3bd15547.14743496@localhost...
> > On Fri, 19 Oct 2001 21:46:29 -0700 impersonator of [EMAIL PROTECTED]
(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" <[EMAIL PROTECTED]> wrote in message
> > >003101c1591a$e00ec290$320110ac@david">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:[EMAIL PROTECTED]]
> > >> Sent: Friday, October 19, 2001 8:03 PM
> > >> To: [EMAIL PROTECTED]
> > >> 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
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to