declare or convert a string to array format

Posted by Jamex on Stack Overflow See other posts from Stack Overflow or by Jamex
Published on 2010-06-01T20:32:27Z Indexed on 2010/06/01 20:33 UTC
Read the original article Hit count: 206

Filed under:
|
|

Hi,

How to convert a string format into an array format?

I have a string, $string = 'abcde'

I want to convert it to a 1 element array

$string[0] = 'abcde'

Is there a built in function for this task??

or the shortest way is to

$string = 'abcde';

$array[0] = $string;

$string = $array;

TIA

© Stack Overflow or respective owner

Related posts about string

Related posts about array