Hi,
I have this code in php 5 and whant to adapt for php 7.2
I have tried using foreach instead of While but it returns error sayng "Array to string convertion" in line "$er.= "<b>".$key."</b>: ".$value." after foreach.
Does anybody know how to solve this?
Thank you.
public function getResumen(){
$er="";
$ar = $this->getTrace();
$er.= "<b>Mensaje</b>: ".$this->message."<br/>";
$er.= "<b>Código</b>: ".$this->code."<br/><br/>";
foreach ($ar as $a=>$p){
//foreach($p as $key => $value){
while(list($key, $value) = each($p)){
//echo();
$er.= "<b>".$key."</b>: ".$value."<br/>";
;
}
}
$in="<div style=\"border:1px solid #000000;padding:10px;background:#f6ca6d;\">";
$in.="<b>Escepsión Resumen</b>:<br/><br/>";
$in.=$er;
$in.="</div><br/>";
return $in;
Hi,
I have this code in php 5 and whant to adapt for php 7.2
I have tried using foreach instead of While but it returns error sayng "Array to string convertion" in line "$er.= "<b>".$key."</b>: ".$value." after foreach.
Does anybody know how to solve this?
Thank you.
public function getResumen(){
$er="";
$ar = $this->getTrace();
$er.= "<b>Mensaje</b>: ".$this->message."<br/>";
$er.= "<b>Código</b>: ".$this->code."<br/><br/>";
foreach ($ar as $a=>$p){
//foreach($p as $key => $value){
while(list($key, $value) = each($p)){
//echo();
$er.= "<b>".$key."</b>: ".$value."<br/>";
;
}
}
$in="<div style=\"border:1px solid #000000;padding:10px;background:#f6ca6d;\">";
$in.="<b>Escepsión Resumen</b>:<br/><br/>";
$in.=$er;
$in.="</div><br/>";
return $in;