Here's a php function and it works perfectly.
$values = array(
'php' => 'php hypertext processor',
'other' => array(
'html' => 'hyper text markup language',
'css' => 'cascading style sheet',
'asp' => 'active server pages',
)
);
function show($id='php', $id2='') {
global $values;
if(!empty($id2)) {
$title = $values[$id][$id2];
}
else {
$title = $values[$id];
}
echo $title;
}
When i execute this <?php show(other,asp); ?> it displays active server pages and it works, but when i do it this way it shows an error
<?php
$lang = 'other,asp'
show ($lang);
?>
It doesn't work., Please help me out here
P.S : It works if i pass variable with single value (no commas)