Just declare? You don't have to. Just make sure variable exists:
$d = array();
Arrays are resized dynamically, and attempt to write anything to non-exsistant element creates it (and creates entire array if needed)
$d[1][2] = 3;
This is valid for any number of dimensions without prior declarations.