| 
	
 | 
 Posted by Vince Morgan on 04/22/07 10:56 
"Henk oegema" <henk@oegema.com> wrote in message 
news:ueGWh.133959$4_7.969815@phobos.telenet-ops.be... 
> I have put the three versions together with their output: 
 
Two versions include code that _was_ posted.  However, one of them is not 
something that was posted here, though it looks similar to one of them. 
This block; 
 
>        if(is_numeric($string[$i]<"5")) 
>                { 
>                        $string[$i]= $string[$i]+ 5; 
>                }else 
>                { 
>                        $string[$i]= $string[$i]- 5; 
>                } 
 
is quite similar to the one below, which is what I actualy posted. 
 
> if(is_numeric($string[$i])) 
>  { 
>    if($string[$i] < "5") 
>    { 
>     $string[$i] = $string[$i] + 5; 
>    }else 
>    { 
>     $string[$i] = $string[$i] - 5; 
>    } 
>  } 
The one above produces exactly the same output as the other two, if the same 
inputs are used. 
Perhaps you made a mistake in typing it up.  Copying and pasting might have 
saved you some time. 
Check what was posted against what you have above. 
Regards, 
Vince
 
  
Navigation:
[Reply to this message] 
 |