📜  数组大小不一致 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:52.495000             🧑  作者: Mango

代码示例1
foreach($products as $key=>$value){

  if(!isset($value->Title)){
    $value->Title = "The product has no title";
  }
  else{
    $value->Title = $value->Title;
  }
}