Hey all, Does anybody know of a way to push an element onto an array with a specific key? What I am trying to do is create a dynamically created associative array. Here is a sample print_r of what an array would look like:
Array ( [default] => css/default.css [forms] => css/forms.css ) I have tried array_push, but can't seem to get the results I am looking for. i.e.: <? array_push($samp, "$key"=>"$value"); // this throws an error array_push($samp, array("$key"=>"$value")); // doesn't give the results i'm looking for /* output from second array_push Array ( [0] => Array ( [default] => css/default.css ) [1] => Array ( [forms] => css/forms.css ) )*/ ?> If anyone can point me in the right direction, I would appreciate any help you can give me. -- Joshua E Minnie/Webmaster [EMAIL PROTECTED] Phone: 616.276.9690 Fax: 616.342.8750 Nextel: 616.862.2847 "Don't work for recognition, but always do work worthy of recognition." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php