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";
  }
  ?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.