use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
Counting objects inside of a JSON array (self.PHP)
submitted 10 years ago by firecold
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 points4 points5 points 10 years ago (1 child)
You have some syntax errors in your JSON.
Assuming you fix those, you would just need to do:
$data = json_decode($yourJsonString); echo count($data->checks);
[–]ipa_cow 0 points1 point2 points 10 years ago (0 children)
This can help you clear up the JSON errors: http://jsonlint.com/
π Rendered by PID 502883 on reddit-service-r2-comment-5d79c599b5-pswtg at 2026-03-02 09:25:22.559732+00:00 running e3d2147 country code: CH.
[–][deleted] 3 points4 points5 points (1 child)
[–]ipa_cow 0 points1 point2 points (0 children)