PHP: array_merge_ recursive() function
PHP: Merge two or more arrays recursively
The array_merge_recursive() function is used to merge the elements of one or more arrays together. The elements of one are appended to the end of the previous one.
If the input arrays have matching string keys, then the values for these keys are merged together into an array, and this is done recursively, so that if one of the values is an array itself, the function will merge it with a corresponding entry in another array too.
If the input arrays contain numeric keys, the later value will be appended instead of overriding the original value.
(PHP 4 and above)
|array_name1||Specifies the name of the array.||Required||Array|
|array_name2..||Specifies the name of the array.||Optional||Array|
The merged array.
Value Type: Array
<?php $array1=array("Subject" => "Physics","Chemistry", "Biology"); $array2=array("Class-XI", "Class-XII", "Roll"=>20); $result=array_merge_recursive($array1, $array2); print_r($result); ?>
Array ( [Subject] => Physics  => Chemistry  => Biology  => Class-XI  => Class-XII [Roll] => 20 )
Practice here online :
PHP: Tips of the Day
Convert HTML + CSS to PDF
Important: Please note that this answer was written in 2009 and it might not be the most cost-effective solution today in 2019. Online alternatives are better today at this than they were back then.
Here are some online services that you can use:
- PDF Layer
- HTML to PDF Rocket
Have a look at PrinceXML.
It's definitely the best HTML/CSS to PDF converter out there, although it's not free (But hey, your programming might not be free either, so if it saves you 10 hours of work, you're home free (since youalso need to take into account that the alternative solutions will require you to setup a dedicated server with the right software).
Ref : https://bit.ly/384yytr
- New Content published on w3resource :
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework