xml - extract photo from rss with [enclosure] and [@attributes] and put in php -


how can extract photos code

[enclosure] => simplexmlelement object (  [@attributes] => array ( [url] => http://cdn.isna.ir/d/2016/11/10/3/57383183.jpg  [length] => 129634 [type] => image/jpeg ) )  

i have tried this

echo "<img src=\"" .$item['enclosure']['url'][1]."\">"; 

but give me error


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -