{"id":171,"date":"2024-09-30T10:34:47","date_gmt":"2024-09-30T09:34:47","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=171"},"modified":"2024-09-30T10:34:47","modified_gmt":"2024-09-30T09:34:47","slug":"mwnci-count-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-count-function\/","title":{"rendered":"Mwnci count() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>count(<i><b>array<\/b><\/i>, <i><b>value<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p><i>count()<\/i> returns the number of elements with the specified value<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>a=[\"fred\", \"jim\", \"fred\", \"bob\"]\r\nprintln(count(a, \"fred\"))\r\n\r\n2\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax count(array, value) Description count() returns the number of elements with the specified value Example a=[&#8220;fred&#8221;, &#8220;jim&#8221;, &#8220;fred&#8221;, &#8220;bob&#8221;] println(count(a, &#8220;fred&#8221;)) 2<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-171","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=171"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/171\/revisions"}],"predecessor-version":[{"id":173,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/171\/revisions\/173"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}