Hi,
I want to create an associative Array with a PHP variable (article ID)
as Key
and another associative array as it's value.
How do I instanciate it, how can I fill it?
I want something like this:
$articleTable= array( $articleNr => array("name" => $name, "price " =>
$price ,"amount" => 0 );
( Amount will be filled later in a form.)
At the end I want an Array that contains data coming from the
database,
something like this:
ArticleNr ArticleName Price Amount
12345 tooth bruth 10 3
24939 stuff 2 1
19492 tooth paste 8 0
29491 water 1 4
So how can this be done?
Thanks,
Stefan
I want to create an associative Array with a PHP variable (article ID)
as Key
and another associative array as it's value.
How do I instanciate it, how can I fill it?
I want something like this:
$articleTable= array( $articleNr => array("name" => $name, "price " =>
$price ,"amount" => 0 );
( Amount will be filled later in a form.)
At the end I want an Array that contains data coming from the
database,
something like this:
ArticleNr ArticleName Price Amount
12345 tooth bruth 10 3
24939 stuff 2 1
19492 tooth paste 8 0
29491 water 1 4
So how can this be done?
Thanks,
Stefan
Comment