how to get count dimension of array code example Example: how to get length of object in php $total = count((array)$obj);