Hi all, is there any prblem with my array? why i can get the first element of the array
function GetNameByEmail($get_staffemail)
{ print_r($get_staffemail);
for($i=0;$i<count($get_staffemail);$i++){
echo "<br />";
echo $qryGetName = "SELECT username FROM user_info WHERE email ='".$get_staffemail[$i]."'";
$rsGetName = mysql_query($qryGetName);
$arrGetName[$i] = mysql_fetch_array($rsGetName, MYSQL_ASSOC);
}
echo "<br />";
print_r($arrGetName);
return $arrGetName[glob_username];
}
here the result(output)
Array ( [0] => hehe@live.com.my [1] => haha@live.com.my )
SELECT username FROM user_info WHERE email ='hehe@live.com.my '
SELECT username FROM user_info WHERE email ='haha@live.com.my'
Array ( [0] => [1] => Array ( [glob_username] => haha ) )
anyone help pls T^T this is the last task and i got to hand up by tomorrow~