php simple html dom parse img html5 attributes?

我怕爱的太早我们不能终老 提交于 2019-11-29 03:45:54
$newimage->data-original;

means

$newimage->data - original;

A way round this is to try:

$property = 'data-original';
$newimage->$property;

or, to use the alternative syntax:

$newimage['data-original'];

Just an FYI:

I tried:

$newimage['data-original'];

but this is what worked for me:

$property = 'data-original';
$newimage->$property;

Hope this will work

$thumbs= $video->find('img[class=image]', 0)->{data-original};

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!