PHP - Count items in object -


i'm using kirby cms , need find out how many posts have.

my posts gotten with

$posts = $pages->find('posts')->children(); 

which echos object 10 items (links posts).

it not array using count() returns 1.

how can count items in object array?

i have no experience library. try this, might work:

$count = $pages->find('posts')->children()->count(); 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -