im trying to return an array of messages but i get this error :
Notice: Array to string conversion in ($sql="select UTLR_UID from adm_utilisateurs where UTLR_LOGIN='$user' and UTLR_MDP='$mdp'";)
Here is my code :
function getHistoriqueNotification($user,$mdp){
$com = new DbConnect();
$sql="select UTLR_UID from adm_utilisateurs where UTLR_LOGIN='$user' and UTLR_MDP='$mdp'";
$result=mysqli_query($com->getDb(),$sql);
$getID = mysqli_fetch_assoc($result);
$userID = $getID['UTLR_UID'];
$sqli = "SELECT AHIS_DES_LN1
FROM alr_historiques
WHERE UTLR_UID=$userID";
$resulti = mysqli_query($com->getDb(),$sqli);
while($row=mysqli_fetch_assoc($resulti)){
$AHIS_DES_LN1=$row['AHIS_DES_LN1'];
$msg = array(
'message' => '$AHIS_DES_LN1'
);
}
return $msg;
}