Thursday, April 20, 2017

array_merge

<?php
$books = array ("PhpCookbook", "PhpRecipies");
$electronics = array("Tab", "Laptop", "Mobile");
$products = array_merge($books, $electronics);
var_dump($products);
?>
Output:
array(5) { [0]=> string(11) "PhpCookbook" [1]=> string(11) "PhpRecipies" [2]=> string(3) "Tab" [3]=> string(6) "Laptop" [4]=> string(6) "Mobile" }

No comments:

Post a Comment

here docs

$x = <<<THE_END PHP stands for "PHP: Hypertext Preprocessor". The acronym "PHP" is therefore, usually referre...