I am trying to check whether the number of items in an object is less than one like this:
if ( count($trailhead_list->o < 1 ) )
It always returns true even if there is some items there.
I am trying to check whether the number of items in an object is less than one like this:
if ( count($trailhead_list->o < 1 ) )
It always returns true even if there is some items there.
You have an error in your brackets, it should read like that:
if ( count($trailhead_list->o) < 1)