php, how to get a array varible value ?
        Posted  
        
            by 
                NovaYear
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by NovaYear
        
        
        
        Published on 2011-01-02T18:47:19Z
        Indexed on 
            2011/01/02
            18:53 UTC
        
        
        Read the original article
        Hit count: 166
        
$lang['profil_basic_medeni'] = array( 
    1 => 'Bekâr',
    2 => 'Evli',
    3 => 'Nisanli',
    4 => 'Iliskide',
    5 => 'Ayrilmis',
    6 => 'Bosanmis'
    );
 $lang['profil_basic_sac'] = array( 
    1 => 'Normal',
    2 => 'Kisa',
    3 => 'Orta',
    4 => 'Uzun',
    5 => 'Fönlü',
    6 => 'Saçsiz (Dazlak)',
    7 => 'Karisik/Daginik',
    8 => 'Her Zaman Bol Jöleli :)'
    );
function sGetVAL($item,$valno) {
  $sonuc = $lang[$item][$valno];
  return $sonuc;
} 
$tempVAL1 = sGetVAL('profil_basic_medeni','3'); // return null
//or
$tempVAL2 = sGetVAL('profil_basic_sac','7'); // return null
$tempVAL1 or $tempVAL2 always return null. why ? how to fix function sGetVAL ???
© Stack Overflow or respective owner