at Behance API a get an array of objects that are my projects. But when I print cover object i get this:
stdClass Object
(
[115] => https://m1.behance.net/profiles18/2701167/projects/8725001/115x461b2d628417adeead62b8ee18869cea.jpg
[202] => https://m1.behance.net/profiles18/2701167/projects/8725001/461b2d628417adeead62b8ee18869cea.jpg
[404] => https://m1.behance.net/profiles18/2701167/projects/8725001/404x461b2d628417adeead62b8ee18869cea.jpg
[230] => https://m1.behance.net/profiles18/2701167/projects/8725001/230x461b2d628417adeead62b8ee18869cea.jpg
)
So, how access variables that start with numbers in PHP ???
如果它存储在名为$object
的变量中,并且您希望获得键202
的值:
$object->{'202'}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.