My array is empty at the moment but I want results from a DB to be pushed onto the end of it using http://uk.php.net/manual/en/function.array-push.php?
If not how is this possible another way?
Regards,
Can array_push be used to push onto an associative array?
Moderator: General Moderators
-
impulse()
- Forum Regular
- Posts: 748
- Joined: Wed Aug 09, 2006 8:36 am
- Location: Staffordshire, UK
- Contact:
Can array_push be used to push onto an associative array?
Last edited by impulse() on Tue May 22, 2007 12:28 pm, edited 1 time in total.
-
impulse()
- Forum Regular
- Posts: 748
- Joined: Wed Aug 09, 2006 8:36 am
- Location: Staffordshire, UK
- Contact:
Sorry, I realised I was being silly as soon as I posted this.
This is what I was looking to do (no need for array_push).
This is what I was looking to do (no need for array_push).
Code: Select all
while ($res = mysql_fetch_array($queryData))
$productsData[$res['groupID']] = $res['groupName'];