I have 2 following data:
$temp = Array
(
[@url] => url
[@type] => image/jpeg
[@expression] => full
[@width] => 644
[@height] => 429
)
$count_total = count($temp); // gives me 5, how can it give me total = 1?
Array
(
[0] => Array
(
[@url] => url1
[@type] => image/jpeg
[@expression] => full
[@width] => 800
[@height] => 621
)
[1] => Array
(
[@url] => url2
[@type] => application/x-shockwave-flash
)
)
this is total:2 // this is correct
How can I get first array count as 1?
COUNT_RECURSIVE- A smarter way would be to useempty();on the first one and then set count to 1 if it isn't empty.