0

im getting this error :

( ! ) Notice: Array to string conversion in C:\wamp64\www\gcm\ind.php on line 14

<?php
include 'config.php';
include 'db.php';
$com = new DbConnect();
$message=array();
$sql="select UTLR_UID from adm_utilisateurs where UTLR_LOGIN='groom' and UTLR_MDP='groomftw'";
$result=mysqli_query($com->getDb(),$sql);
$getID = mysqli_fetch_assoc($result);
$userID = $getID['UTLR_UID'];
$sqli = "SELECT AHIS_DATEHEURE,AHIS_DES_LN1 FROM alr_historiques WHERE UTLR_UID=$userID ";
$resulti = mysqli_query($com->getDb(),$sqli);
while($row=mysqli_fetch_assoc($resulti))
$message[]=$row['AHIS_DATEHEURE'].$row['AHIS_DES_LN1'];

//14

echo $message;


?>
denzo kx
  • 51
  • 1
  • 6

1 Answers1

0

document

void echo ( string $arg1 [, string $... ] )

echo only able to output data of string type , or other data that can be directly converted to string ,such as boolean,int,null,float.

I just noticed that you are in php 3 , you can try this

foreach($message as $m){
   //need to ensure that $m is a string type
   echo $m;
}

see more :

What is the difference between var_dump, var_export and print_r ?

I'm new to stackoverflow, Hope can help you.

qskane
  • 481
  • 4
  • 16