PHP Arrays

Ordered Arrays

<?php
    $a[0] = 1;
    $a[1] = "foo";
    $a[]  = 1.57;
?>

Associative arrays

<?php
$catch_it['cat'] = "mouse";
$catch_it['dog'] = "cat";
?>

Manipulating

  • Sorting: sort(), rsort(), ksort(), usort(), array_multisort()
  • Traversal: reset(), end(), next(), each(), current(), key(), array_walk()
  • Advanced: array_diff(), array_intersect(), array_merge(), array_merge_recursive(), array_slice(), array_splice() and lots more

 


Loading ...

Related Results :

  1. PHP Arrays
Note :
  • Related Posts are generally User Blog posts.
  • or Other tutorials from other networks of w3clan.com.
  • Any registered user can create related posts based on search term tags.

About the Author