This is what I recently did to quickly create a two dimensional array (10x10), initialized to 0:<?php $a = array_fill(0, 10, array_fill(0, 10, 0));?>This should work for as many dimensions as you want, each time passing to array_fill() (as the 3rd argument) another array_fill() function.