Hi
I know it's possible to push a value onto an existing array, with array_push. But then the keys are set automatically. I want to push the value for the key also. Anyone know if, and how, this can be done?
Regards tores
push both key and value onto an array
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
$arr[$key] = $value;