Re: Multidimensional Array
The array is an indexed array and therefore must be accessed with indexes i.e: 0,1,2,3 . It is difficult from what you have shown above where the data has come from. Is it a regular expression?
Re: Multidimensional Array
I physically make the array further up in the script, here it is...
Code:
// field, prefix, suffix, required
$book = array(
array('author', '', '', true),
array('year_of_publication', '', '', true),
array('title', '<em>', '</em>', true),
array('edition', '', '', false),
array('publisher', '', '', true)
);
Re: Multidimensional Array
Author is a key. So use the => operator to specify this in your top level array:
Code:
$book = array (
'author' => array('','',true) ...
...
...
Re: Multidimensional Array