How to display something from array with another name in PHP?
I have one array that returns one e开发者_如何学Pythonlement $name, and I want to display it with another name.
For example:
$name = 'PC'
and I want to display it as 'PC COMPUTER', first array displays element which is true, how to compare this elements with another array to display it with that other names?
Can't you just make a second array and load it up with more descriptive names, then use the first as a key?
$name = 'PC';
$description = array('PC' => 'PC COMPUTER');
echo $descriptions[$name];
Is that what you are looking for?
$array[$name] = 'PC COMPUTER' & Post ur array .give a eg:
精彩评论