how to get length of object in php
snippet in php

count array php

user9408

$cars=array("Volvo","BMW","Toyota");
echo count($cars);
//returns 3

how to get length of object in php

user1333

$total = count((array)$obj);