Re: string to array

From: Date: Fri, 08 Nov 2002 13:57:35 +0000
Subject: Re: string to array
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-123378@lists.php.net to get a copy of this message
This is working great, thank you. Timothy's expression output one empty element at the start and the end, but otherwise worked ( and I don't know why :-( Erwin wrote:
$string = explode( '', 'string' );
     
Timothy Hitchens wrote:
That won't work.. empty delimiter errors always..
Your right, I didn't know.
you will have to use my preg one from earlier...
But your preg thingy will only split at spaces, so that'll have to change to <? $string = 'test'; preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY); ?> in this case, right? Grtz Erwin


« previous php.general (#123378) next »