Re: [PHP-DB] String manipulation

2009-09-11 Thread olavi
You can do like this: $str = 'helloworld'; echo preg_replace('//', ' ', $str); this will print out -> h e l l o w o r l d Olavi Ivask > How would I put a space after each letter: > > echo str_shuffle(stripslashes(mysql_result($word_result,0,"word")); > > Ron -- PHP Database Mailing List (

Re: [PHP-DB] String manipulation

2009-09-11 Thread boclair
Ron Piggott wrote: How would I put a space after each letter: echo str_shuffle(stripslashes(mysql_result($word_result,0,"word")); Ron CSS best handles styling E.G. OR $word_result"; ?> Increase the em value to customize the spacing Louise -- PHP Database Mailing List (http://w

RE: [PHP-DB] String manipulation

2005-05-02 Thread Bastien Koert
Are you trying to achieve this in the db or for the application? It sounds like the application, in which case I would get the string from the db and then use substr to pull out the various elements. $first_name = substr($rows['name'],0,1); $last_name = substr($rows['name'],1); Bastien From: "Ch