Hi guys,
I know how arrays work in PHP but my problem is when it comes to array_push();
what i am trying to do is push a series of elements into an array
example:
$array = array();
$string = "Phil" => "17" => "18/03/1992";
array_push($array,$string);
so in $string we have name => age => date of birth
when i try to call an array value however i end up with either the array key or the =>
what am i doing wrong?
why dont i just do it as
$array = array (
"phil" => "17" => 18/03/1992"
);
because of the way my script works
thanks in advance!
I know how arrays work in PHP but my problem is when it comes to array_push();
what i am trying to do is push a series of elements into an array
example:
$array = array();
$string = "Phil" => "17" => "18/03/1992";
array_push($array,$string);
so in $string we have name => age => date of birth
when i try to call an array value however i end up with either the array key or the =>
what am i doing wrong?
why dont i just do it as
$array = array (
"phil" => "17" => 18/03/1992"
);
because of the way my script works
thanks in advance!