Source Code:
(back to article)
<?php $name = "John"; $age = 30; $city = "New York"; $state = null; $myArray = compact("name", "age", "city", "state"); print_r($myArray); ?>
Result:
Report an issue