Sat May 30 2020
Break Array
PHP Scripting924 views
File Name: break-array.php
<?php
$data = "Web development using PHP";
/* Break string into array using 'explode' */
$array = explode(" ", $data);
var_dump($array);
/* Join array into string using 'implode' */
$string = implode(" ", $array);
echo "<br />".$string;
?>
/* Output */
array(4) { [0]=> string(3) "Web" [1]=> string(11) "development" [2]=> string(5) "using" [3]=> string(3) "PHP" }
Web development using PHP
Author:Geekboots