This section demonstrates Learn the PHP Array as String as well as how to use implode() php function.
This section demonstrates Learn the PHP Array as String as well as how to use implode() php function.
<?php
$ar1=array("apple","banana","tomato","potato");
echo $ar1;
echo "<br>size is ".sizeof($ar1);
$a=implode(",",$ar1);
echo "<br>".$a;
echo "<br> size is ".sizeof($a);
?>
Output
Array
size is 4
apple,banana,tomato,potato
size is 1