$array
seems not to be an array at all. You'll get the title attribute of this object with $array->Title
how to find 2nd element of stdclass object array
Вопрос
i want remote html content on my page. for that i am getting an array in stdclass object array. i print_r(array) which is given below
stdClass Object (
[player_video] => Array ( )
[Title] => Ciara
[video_Link] => Oh.flv
[img] => img
[desc] =>
[view] => 18
[artist_name] => Ciara
)
how can i get title from this array. i tried $array[0]['Title']
$array['player_video']['Title']
but all these type of functions return nothing. i think i m using wrong approach. Please guide how to achieve this. Thanks
Решение
Другие советы
Use arrow ->
instead of square brackets []
. Try this -
$array->Title
If it's an object then try:
$stdClass->Title;
Не связан с StackOverflow