For your first question, I don't know.. I wouldn't have thought using "new $this" was possible regardless of version as your are instantiating an object, from an object and not a class, meh.
Second question: That is a multidimensional array. In layman's terms, it's an array of arrays.
e.g.:
Code: Select all
<?php
$array = array(array('foobar'));
echo $array[0][0]; //outputs (string) 'foobar'
?>
Multi-dimensional arrays are very handy in varying situations. A particular instance I have seen and used such an array, is in the use of storing Database Table Rows..
Code: Select all
<?php
$rows = array();
while ($row = mysql_fetch_assoc($result)) {
$rows[] = $rows;
}
?>
$rows will now contain every row returned by the query (that has been omitted in the example.)
Therefore, if I wanted to echo, for example, the column labelled "user" from the 5th row, I can use the following:
remembering of course that the $rows array is a zero-indexed array (first indice is 0.)
HTH
