I have a little snippet of code and i can't make it work.
$dict = array('401003' => "Test")
function getID ($tempid) {
$id = '<span title="'.$tempid.'">'.$dict[$tempid].'</span>';
return $id;
}
echo getID('401003');
echo $dict['401003'];
I expected to get the 'Test' twice, but only the second echo returned me the 'Test'. Something seems to be wrong with the $dict[$tempid] in the function
Can you guys help me please?