Using the array_push () Function
<?php
$vocalists = array ("A", "B", "C");
$musicians = array_push($vocalists, "D", "E", "F");
echo "The total number of musicians are $musicians:", "\n";
foreach ($vocalists as $val) {
echo "$val", "\n";
}
?>
Related examples in the same category