Answers for "php array tutorial"

PHP
0

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
Posted by: Guest on August-17-2021

Browse Popular Code Answers by Language