I have a string, how do I convert it to an array?
After manipulating that array, how do I again make it into a string?
Do strings in PHP behave the same way
explode ( string $delimiter , string $string [, int $limit ] )
... and after changes ...
implode ( string $glue , array $pieces )
check out http://php.net/explode
and http://php.net/implode
You can also use split or join which, as far as I know, support regex
$wordArray = str_split('string to array');
in php you can use:
split like
Description
array split ( string $pattern , string $string [, int $limit ] )
Splits a string into array by regular expression.
or
implode
<?php
$array = array('lastname', 'email', 'phone');
$comma_separated = implode(",", $array);
echo $comma_separated; // lastname,email,phone
?>