Separating spaces from the rest

From: Date: Fri, 30 Apr 2004 23:22:20 +0000
Subject: Separating spaces from the rest
Groups: php.general 
Request: Send a blank email to php-general+get-185080@lists.php.net to get a copy of this message
I have an array with many strings, of which most have spaces or tabs at the beginning, but no fixed number of them. Example:
$arr[0] = '    Hello.';
How can I separate them into two strings? Like: Array (
    [0] => Array
        (
            [0] => "    "  //I added the quotes to notice the space.
            [1] => Hello.
        )
) TIA! Anguz

« previous php.general (#185080) next »