Multiple Array -solved- allways remember to decalre GLOBALS
Posted: Thu Jul 13, 2006 6:04 am
Thanks a lot, Bogdan
--------------------------------------------------------
If I have this array:
and I know "a". Like this:
How do I print "alfa" ?????
Thanks. Bogdan
-------------------------------------------------------------------------------------------------------------------
previous unclear post :
-------------------------------------------------------------------------------------------------------------------
Hi, I am unable to figure the following:
I have an array:
I have a form with POST where a user selects options: a,b,.... Which I then look for and am supposed to post to another form, "alfa".....
How do I do that, how do I get the "alfa" from the array?
More code with comments:
Regards, B
--------------------------------------------------------
If I have this array:
Code: Select all
$TheMainArray = array(
"qwerty001" => array(
"a" => "alfa",
.......................),
);Code: Select all
$theVariable = "a";Thanks. Bogdan
-------------------------------------------------------------------------------------------------------------------
previous unclear post :
-------------------------------------------------------------------------------------------------------------------
Hi, I am unable to figure the following:
I have an array:
Code: Select all
$zuzu =array(
"zuzu1" => array (
"a" => "alfa",
"b" => "beta",
......),
"zuzu2" => array (
"asd" => "123",
.......),
);How do I do that, how do I get the "alfa" from the array?
More code with comments:
Code: Select all
function GetSessionZuzu($SESSION)
{
$categoryName = "zuzu";
if(empty($SESSION[$categoryName]))
return false;
$zuzu = $SESSION[$categoryName];
return $zuzu;
}
// and then :
$ZuzuArray = $session->GetSessionZuzu($SESSION);
if($paramSessionName == 'zuzu')
{
$caca = $ZuzuArray[$paramSessionName];
echo "aaaaa : $caca <br>"; // this returns the "a", but I want to return the "alfa" NOT the "a"
}Regards, B