We can convert string to array using php predefined function named as explode().
Syntax for explode is:
explode('separator',string);
Example -
$string = "This is a text";
$split_data = explode('',$string); // splitting by space as a separator
Print the $split_data variable and Output is like
$split_data [0] = 'This';
$split_data [1] = 'is';
$split_data [2] = 'a';
$split_data [3] = 'text';
0 Comment(s)