Posts: 427
Name: Stuart
Location: Glasgow, Scotland
|
From PHP manual, explode() info:
Quote:
|
If separator is an empty string (""), explode() will return FALSE
|
I think want you want to use is the preg_split() function. See example below.
Quote:
Example 2. Splitting a string into component characters
PHP Code:
<?php
$str = 'string';
$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
print_r($chars);
?>
|
Hope this helps
Stoot
PS your string declaration should probably have "s around it.
EDIT:
Thought i'd add the definition cos you can ignore some of the parameters...
array preg_split ( string pattern, string subject [, int limit [, int flags]])
|