i have object
stdClass Object
(
[0] => stdClass Object
(
[id] => 18
)
[1] => stdClass Object
(
[id] => 20
)
)
The count() function should show 2 but it is showing 1.
i have object
stdClass Object
(
[0] => stdClass Object
(
[id] => 18
)
[1] => stdClass Object
(
[id] => 20
)
)
The count() function should show 2 but it is showing 1.
try this, hope it work
$count = count((array)$obj);