Home Tutorial Php List PHP list array keys

 
 

Share on Google+Share on Google+
PHP list array keys
Posted on: October 31, 2009 at 12:00 AM
Advertisement
In this part of the tutorial we will learn about the function array_keys in context of list in PHP. And we will also see the example related to the array_keys() function

  • array_keys() function returns the keys of the the given array.
  • It returns the keys in the form of array.


Example of PHP list Array Keys

<?php
    $ar1
=array("x"=>"x-mas","y"=>"yak","zebra");
    $key
=array_keys($ar1);
    print_r($key);
?>

   Output
   Array ( [0] => x [1] => y [2] => 0 )
Advertisement

Related Tags for PHP list array keys:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 31, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com