$Cars = array(4 => 'BMW', 6 => 'Dastun', 11=> 'Honda');

Write a PHP script to get the First element of the above array

Introduction

PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1.  
  2. <?php
  3. $Car = array(4 => 'BMW', 6 => 'Dastun', 11=> 'Honda');
  4. echo reset($Car)."\n";
  5. ?>

Result

python language techstudy.org

     





Related Topics




Popular Posts