I created a array_common.php to save my array. because these array always use.
function show_common($value,$type){
$array_common = substr(dirname(__FILE__),0,-10)."config/array_common.php";
include "$array_common";
$show = $arr_.$type["$value"];
return $show;
}
I include array_common.php so I got the these array value. array_common.php content
$arr_come_from=array(
"1"=>"Google",
"2"=>"facebook",
"3"=>"yahoo",
"4"=>"twitter",
"99"=>"other"
);
$arr_gender=array(
"1"=>"Male",
"2"=>"Female"
);
I created this function and I hope use this to show array content
show_common(2,come_from); //echo facebook
show_common(1,gender); //echo Male
show_common(2,gender); //echo Female
but php Notice: Notice: Undefined variable: arr_ in.........
maybe this code problem?
$show = $arr_.$type["$value"];
any suggest?