Re: QF - Add empty option top of the list
| From: | Mark Wiesemann | Date: | Wed, 12 Jul 2006 16:44:17 +0000 |
| Subject: | Re: QF - Add empty option top of the list | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24627@lists.php.net to get a copy of this message | ||
Köteles Zoltán wrote:
> How can I add an empty option to the top of the list?
> $query = "
> SELECT m.module_id AS mid, m.module_name AS mname
> FROM Modules m
> WHERE m.is_active = 1
> ORDER BY m.module_name
> ";
> $result = $mdb2->query($query);
> $modules = $result->fetchAll('', $rekey = true);
Something like
$modules = array_merge(array('' => ''), $modules);
should be right thing here.
Regards,
Mark