Jump to content

array_push with 2D arrays


climbjm

Recommended Posts

if I have an array that I have created and I want to push data to it.... anyone have an idea as to how to do that?

example:
[code]$name = "bob";
$age = 21;
// I want to push the info so the first Col is the name and the second Col is the age,  I cant use a db.

$personArray = array();
array_push($personArray,<this is where i am lost>);[/code]

Any ideas?
http://us3.php.net/manual/en/function.array-push.php I've tried looking here, but I didn't see it.
Link to comment
https://forums.phpfreaks.com/topic/32368-array_push-with-2d-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.