PHP array extraction?

jnbill1204

New member
I have an array that I have posted to a form and I cannot seem to figure out how to get it out. Here is what it looks like

[attributes] => Array
(
[1] => 1
)

What I want to do is take that attributes array and add more arrays inside of it but I cannot seem to figure out how do that.

I want to look like this
[attributes] => Array
(
[1] => 1
[10] => 'this is a test'
[4] => '10/30/1906'
)

How can do this?
 
to add elements to an array just:

$myarr = array("1");

$myarr[] = "this is some thing";

$myarr['indexorkey'] = "this is more some thing";

or

multidimensional array
$myarr = array();

$myarr = array("my name", 122222222, 34254535354),array("weee", 12211212121, 442342342424));

var_dump($myarr);
print_r($myarr);

foreash($myarr as $key => $value){
echo $key . " :: " . $value . "<br>";
}
 
I cant answer this, but my experience says join a site called PHP freaks there is a REALLY good forum there
 
Back
Top