繁体   English   中英

注意:数组到字符串的转换PHP 3

[英]Notice: Array to string conversion PHP 3

即时通讯收到此错误:

(!)注意:第14行的C:\\ wamp64 \\ www \\ gcm \\ ind.php中的数组到字符串的转换

<?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;


?>

文献

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

echo 仅能输出string类型的数据,或可以直接转换为string其他数据,例如booleanintnullfloat

我只是注意到您在php 3 ,可以尝试一下

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

查看更多 :

var_dump,var_export和print_r有什么区别?

我是stackoverflow的新手,希望能为您提供帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM