PHP   15

array

Guest on 12th May 2022 01:08:29 AM

  1. <?php
  2. $index_array = array(1, 2, 3);
  3. $assoc_array = array(1 => 'one', 2 => 'two');
  4.  
  5. $variation_array = array(
  6.   'empty array' => array(),
  7.   'int indexed array' => $index_array,
  8.   'associative array' => $assoc_array,
  9.   'nested arrays' => array('foo', $index_array, $assoc_array),
  10.   );
  11. ?>

Raw Paste


Login or Register to edit or fork this paste. It's free.