Re: String breaking up

From: Date: Fri, 26 Oct 2001 13:13:22 +0000
Subject: Re: String breaking up
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72443@lists.php.net to get a copy of this message
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; $i<count($string); $i++) { echo strtoupper($string[$i]).'<br>'; } That's about all there is to it! :) Use the strtoupper() function if you mean to have everything uppercase like in your example. Rick > 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 > w: At Work > > __________________________________________________ > Do You Yahoo!? > Make a great connection at Yahoo! Personals. > http://personals.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#72443) next »