This:
$word = 'test';
$len = strlen($word);
for ($a = 0; $a < $len; $a++) {
print $word{$a} . "\n";
}
Will print:
t
e
s
t
Regards,
Philip
On Thu, 27 Mar 2003, Oden Odenius wrote:
> I have $word = "test";
> And i want to split it like
> t
> e
> s
> t
>
> I want to make a loop.Like $a = "123"; //$a is One two threw not hundred...
> and i want to make for each $a then $b = $a + 2
>
> The output will be.
> 3 (1+2)
> 4 (2+2)
> 5 (3+2)
>
> Any example?
>
> Btw sorry for my english
>
>
>
> --
> Programmers are tools for convert coffeine into code... (c) Oden
>
>
>
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php