{"id":292,"date":"2018-01-04T18:27:52","date_gmt":"2018-01-04T18:27:52","guid":{"rendered":"http:\/\/mddir.com\/how-to\/?p=292"},"modified":"2018-01-04T18:27:52","modified_gmt":"2018-01-04T18:27:52","slug":"use-str_word_count-function","status":"publish","type":"post","link":"https:\/\/www.mddir.com\/how-to\/use-str_word_count-function\/","title":{"rendered":"Use str_word_count function"},"content":{"rendered":"<p>The <code>str_word_count()<\/code> function counts the number of words available in the variable value.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>[php]&lt;?php<br \/>\necho str_word_count(&quot;Hello world!&quot;);<br \/>\n?&gt; [\/php]<\/p>\n<p>It will generate the following result.<\/p>\n<p><code>2<\/code><\/p>\n<p>The <code>str_word_count()<\/code> function has counted the number of words available in the variable value <code>\"Hello World!\"<\/code> and returned the result <code>2<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The str_word_count() function counts the number of words available in the variable value. Example: [php]&lt;?php echo str_word_count(&quot;Hello world!&quot;); ?&gt; [\/php] It will generate the following<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-292","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts\/292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/comments?post=292"}],"version-history":[{"count":1,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts\/292\/revisions"}],"predecessor-version":[{"id":293,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts\/292\/revisions\/293"}],"wp:attachment":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/media?parent=292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/categories?post=292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/tags?post=292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}