array size in php when only one element code example
Example 1: limit offset array php
array_slice($array, 0, 50); // same as offset 0 limit 50 in sql
Example 2: how to get length of object in php
$total = count((array)$obj);
array_slice($array, 0, 50); // same as offset 0 limit 50 in sql
$total = count((array)$obj);