> Strings are arrays, so you can print out a string by doing something like
> this:
Yups, this is possible, but i think he wants to have a newline for each
character,
you can doe this excelent with a small addition to your example:

> $string = "hey there!";
>
> for ($i=0; $i<count($string); $i++) {
>   echo strtoupper($string[$i]);
> }

becomes:
$string = "hey there!";

for ($i=0; $i<count($string); $i++) {
  echo "$string[$i]\n"; // or "<br>" if you want to use HTML
}

Kees


-- 
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