Individual Array Entries
| From: | Keith Spiller | Date: | Thu, 12 Jul 2007 22:53:27 +0000 |
| Subject: | Individual Array Entries | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-43777@lists.php.net to get a copy of this message | ||
Hi Everyone,
RE: Individual Array Entries
I am using a mini calendar script which uses the following array to enter event dates.
$days = array(
3=>array("/weblog/archive/2004/Jan/03","linked-day"),
8=>array("/weblog/archive/2004/Jan/08","linked-day"),
22=>array("/weblog/archive/2004/Jan/22","linked-day")
);
// 3, 8 & 22 = the day
// weblog/archive... = the link
// linked-day = the CSS class.
Because I get the event data from a database and loop through the results of a query, I need to be able to insert each entry individually instead of as a group.
The following code fails in that it only lists the last entry:
$days = array($theday[$y]=>array("#$thelink[$y]","linked-day"));
Using a concatenation fails altogether:
$days.= array($theday[$y]=>array("#$thelink[$y]","linked-day"));
I just do not know the proper syntax to individually insert entries into this multidimensional array... Please help. Thank you.
Keith