Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array

$cars = array('BMW', 'Ferrari', 'Honda');

$str= implode(', ', $cars);
echo $str;                  //array to string

$arr = explode(', ', $str);
echo json_encode($arr);     //string to array
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #array
ADD COMMENT
Topic
Name
8+1 =