hi i'am using a mvc structure for my web site, i have a class that contains a multidimensional array with a class instanciation in it like this:
protected $db;
/* Construit une instance avec 4 poèmes. */
public function __construct() {
$this->db = array(
"01" => new Poem("Ma bohème", "rimbaud.jpg", "Arthur Rimbaud", "boheme"),
"02" => new Poem("J'ai tant rêvé de toi", "desnos.jpg", "Robert Desnos", "reve"),
"03" => new Poem("Chanson d'automne", "verlaine.jpg", "Paul Verlaine", "sanglots"),
"04" => new Poem("Liberté", "eluard.jpg", "Paul Éluard", "liberte"),
);
}
my question is how to use array_push to add values in it.(these values are from a form) and how to deal with the id of the array