[PHP] String breaking up

2001-10-26 Thread Dan McCullough
I was looking to take a string like Dan and return it like D A N is it the str function that does that = Dan McCullough --- Theres no such thing as a problem unless the servers are on fire! h: 603.444.9808 w: McCullough Family

Re: [PHP] String breaking up

2001-10-26 Thread Richard Baskett
Strings are arrays, so you can print out a string by doing something like this: $string = hey there!; for ($i=0; $icount($string); $i++) { echo strtoupper($string[$i]); } That's about all there is to it! :) Use the strtoupper() function if you mean to have everything uppercase like in your

Re: [PHP] String breaking up

2001-10-26 Thread Richard Baskett
To be more precise add the br at the end of the line between the for loop: Strings are arrays, so you can print out a string by doing something like this: $string = hey there!; for ($i=0; $icount($string); $i++) { echo strtoupper($string[$i]).'br'; } That's about all there is to it! :) Use

RE: [PHP] String breaking up

2001-10-26 Thread Kees Hoekzema
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; $icount($string); $i++) {

Re: [PHP] String breaking up

2001-10-26 Thread _lallous
$string = hey there!; $out = ''; for ($i=0; $icount($string); $i++) { $out .= strtoupper($string[$i]) . \n; // or br if output is to browser } echo $out; Richard Baskett [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Strings are arrays, so you can print

Re: [PHP] String breaking up

2001-10-26 Thread Dan McCullough
This only returns the first letter? --- _lallous [EMAIL PROTECTED] wrote: $string = hey there!; $out = ''; for ($i=0; $icount($string); $i++) { $out .= strtoupper($string[$i]) . \n; // or br if output is to browser } echo $out; Richard Baskett [EMAIL PROTECTED] wrote in message

Re: [PHP] String breaking up

2001-10-26 Thread * RzE:
Original message From: Dan McCullough [EMAIL PROTECTED] Date: Fri, Oct 26, 2001 at 06:03:00AM -0700 Message-ID: [EMAIL PROTECTED] Subject: [PHP] String breaking up I was looking to take a string like Dan and return it like D A N is it the str function that does that = Dan