I have variable:
$default['text']="This is default text";
and $other_text['text']="This is other text";
I would like to choose one of them in function:
function insertText($param){
if(isset($other_text[$param]))
echo($other_text[$param]); (*)
else
echo($default[$param]); (**)
}
if instead of lines (*) and (**) I write something like: echo("other_text"); and echo("default_text");
I always receive second option. That's why I assume there is something wrong with $var[$param] construction. How should that look like?