Try this: $array = explode( ' ', chunk_split( $sting, 1, ' ' ) );
http://www.php.net/manual/de/function.explode.php http://www.php.net/manual/de/function.chunk-split.php On Thu, 26 Aug 2004 00:50:09 +0200, Peter Brodersen <[EMAIL PROTECTED]> wrote: > Hi, > > On Wed, 25 Aug 2004 18:00:49 -0400, in php.general > [EMAIL PROTECTED] (Jake McHenry) wrote: > > >Hi everyone. > > > >Is there a way to explode by every character in the variable? > > > >Example: > > > >$var = "00008"; > >$test = explode("", $var); > > Use preg_split(): http://php.net/preg_split - example 2. > > <?php > $var = "00008"; > $test = preg_split('//', $var,-1,PREG_SPLIT_NO_EMPTY); > print_r($test); > ?> > > Or, a possible faster method, using str_split() (only available in > PHP5): http://php.net/str_split > > <?php > $var = "00008"; > $test = str_split($var); // requires PHP5 > print_r($test); > ?> > > -- > - Peter Brodersen > > > > -- > 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