if($ctag->GetName()=="img")
{
$row = array();
$row['imgsrc'] = trim($ctag->GetInnerText());
$row['text'] = $ctag->GetAtt('text');
$images[] = $row;
}
我们只需在里面插入$row['litpic'] =$ctag->GetAtt('ddimg'); 即可解决
if($ctag->GetName()=="img")
{
$row = array();
$row['imgsrc'] = trim($ctag->GetInnerText());
$row['text'] = $ctag->GetAtt('text');
$row['litpic'] =$ctag->GetAtt('ddimg'); //得到缩略图
$images[] = $row;
}