note 75378 deleted from ref.array by nlopess
| From: | nlopess@php.net | Date: | Sun, 27 May 2007 19:02:20 +0000 |
| Subject: | note 75378 deleted from ref.array by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126965@lists.php.net to get a copy of this message | ||
Note Submitter: sesc03 at web dot de
----
@spasme:
You are mistakenly using the "=>" notation outside of an "array()" statement.
You can say "$x = array ($key => $value);", but to add a value/key pair to an array you
need to say "$x[$key] = $value;"
Thus your command should look like this:
while ($qry = mysql_fetch_array($result)) {
days[$qry[day]] = array ('#link', 'linked-day');
}
(I trust you to know what you want to achieve with '#link', 'linked-day')