php json:encode returning undefined on http call on angular controller on server but works well on the localhost.
if( hash_equals($hashed_password, crypt($password, $hashed_password))){
$pass = "true";
$result = array('pass' => $pass, 'FirstName' => $f_name,
'LastName' => $l_name,'id' => $id);
}else{
$pass = False;
$result = array('pass' => $pass, 'FirstName' => "", 'LastName' => ""
, 'id' => $id);
}
$json_response = json_encode($result);
echo $json_response;