Last active
December 1, 2019 16:34
-
-
Save jenovateurs/9189a1de0cd20201c726447acdafd22c to your computer and use it in GitHub Desktop.
Nouveauté PHP 7.4 - Fusionner/Dépiler tableau dans un autre
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$aProduitsExportes = ['pomme', 'poire']; | |
$aFruits = ['banane', 'pasteque', ...$aProduitsExportes, 'kiwi']; | |
print_r($aFruits); | |
/* Resultat | |
Array | |
( | |
[0] => banane | |
[1] => pasteque | |
[2] => pomme | |
[3] => poire | |
[4] => kiwi | |
) | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment