Q: How to change value by key in an php array I have the following array:
array (
  'ID' => 'X485000CF',
  'TITLU' => 'xxxxxxxxxxxx,
  'APARTAMENTE' => 'Apartament',
  'GARS' => NULL,
  'VIL' => NULL,
  'SPA' => NULL,
  'INTRA' => NULL,
  'EXTRA' => NULL,

I want to change the value of the key "APARTAMENTE" in to "Cas/vil" 
function timobil($str){
  $timobil1= array('APARTAMENTE' => 'Cas/vil');
  return strtr($str, $timobil1);
}

and print this in an XML document using
$identification->addChild('property_type', timobil($tip_proprietate));


A: $array=array (
 'ID' => 'X485000CF',
 'TITLU' => 'xxxxxxxxxxxx',
 'APARTAMENTE' => 'Apartament',
 'GARS' => NULL,
 'VIL' => NULL,
 'SPA' => NULL,
 'INTRA' => NULL,
 'EXTRA' => NULL);

$array['APARTAMENTE']='Cas/vil';

print_r($array);

Now new array will be updated.
