<?php $a = [0 => array(), 1=> array()]; $a[0] = "cat";$a[0] = "dog";$a[1][] = "koala";$a[1][] = "horse"; var_dump($a);
Standard input is empty
array(2) { [0]=> string(3) "dog" [1]=> array(2) { [0]=> string(5) "koala" [1]=> string(5) "horse" } }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!