Re: [PHP] array_push in array maps

2006-05-03 Thread Brad Bonkoski
I don't believe you 'push' to an associative array like this, but if you want to add black for example...just do: $colors['black'] = '#ff'; -Brad Jonas Rosling wrote: Need solve another case regarding array maps. Is it possible to insert more values like with array_push in arrays as

Re: [PHP] array_push in array maps

2006-05-03 Thread chris smith
Need solve another case regarding array maps. Is it possible to insert more values like with array_push in arrays as bellow? $colors = array( 'red' = '#ff', 'green' = 'X00ff00', 'blue' = '#ff' ); Yes. http://www.php.net/array_push

Re: [PHP] array_push in array maps

2006-05-03 Thread Stut
Jonas Rosling wrote: Need solve another case regarding array maps. Is it possible to insert more values like with array_push in arrays as bellow? $colors = array( 'red' = '#ff', 'green' = 'X00ff00', 'blue' = '#ff' ); Did you try it?

Re: [PHP] array_push in array maps

2006-05-03 Thread Stut
Brad Bonkoski wrote: $colors['black'] = '#ff'; Black? Are you sure? -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array_push in array maps

2006-05-03 Thread Brad Bonkoski
or white ;-) Stut wrote: Brad Bonkoski wrote: $colors['black'] = '#ff'; Black? Are you sure? -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] array_push in array maps

2006-05-03 Thread Jay Blanchard
[snip] Need solve another case regarding array maps. Is it possible to insert more values like with array_push in arrays as bellow? $colors = array( 'red' = '#ff', 'green' = 'X00ff00', 'blue' = '#ff' ); [/snip] // Append associative

Re: [PHP] array_push in array maps

2006-05-03 Thread Jochem Maas
Stut wrote: Brad Bonkoski wrote: $colors['black'] = '#ff'; Black? Are you sure? Brad might be wearing his 'negative' goggles today :-) -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array_push in array maps

2006-05-03 Thread Jochem Maas
Jonas Rosling wrote: Need solve another case regarding array maps. Is it possible to insert more Jonas - in php we just call these things arrays (no 'map') - the array datatype in php is a mash up (and we love it :-) of the 'oldschool' numerically indexed array and what is commonly known as a

Re: [PHP] array_push in array maps

2006-05-03 Thread Jonas Rosling
There's allways mutch to learn. :-) I'm very happy for all help I can get. I ran into another problem when trying to insert a value. I had no problem with: $test['something'] = '2500'; But when I want to have a value from a special column i a row the followint doesn't work:

Re: [PHP] array_push in array maps

2006-05-03 Thread Brad Bonkoski
What kind of values are stored in $row[2] and $row[5]? You might need to keep the single quotes $test['$row[2]'] = $row[5]; -Brad Jonas Rosling wrote: There's allways mutch to learn. :-) I'm very happy for all help I can get. I ran into another problem when trying to insert a value. I

Re: [PHP] array_push in array maps

2006-05-03 Thread Jochem Maas
Jonas - what do you mean 'it doesn't work' (it's like me saying 'the ATM doesn't work and forgetting to mention I'm trying to withdraw 10,000,000 disney dollars - when I mention that fact the reason is probably obvious to you why it doesn't work) Brad Bonkoski wrote: What kind of values are

Re: [PHP] array_push in array maps

2006-05-03 Thread John Wells
On 5/3/06, Jochem Maas [EMAIL PROTECTED] wrote: Jonas Said: But when I want to have a value from a special column i a row the followint doesn't work: $test[$row[2]] = $row[5]; Or: $test[$row(2)] = $row[5]; Do I need to do some kind of concatenating? Ah, Lasso! I coded that in