{"id":1022,"date":"2024-12-17T04:57:34","date_gmt":"2024-12-17T04:57:34","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=1022"},"modified":"2024-12-17T04:57:48","modified_gmt":"2024-12-17T04:57:48","slug":"mwnci-tail-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-tail-function\/","title":{"rendered":"Mwnci tail() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>tail<strong>(<em>string<\/em>|<em>array<\/em>, <em>integer<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>tail()<\/i> function returns the last designated amount of lines from a string, or last amount of elements from an array.<\/p>\n<p>Lines in a string are deemed to be separated by a newline (\\n)<\/p>\n<h2>Example<\/h2>\n<p>MyString=&#8221;One\\n2\\nThree Four\\n5\\nSix&#8221;<br \/>\nMyArray=[&#8220;One&#8221;, 2, &#8220;Three&#8221;, &#8220;Four Five&#8221;, &#8220;six&#8221;]<br \/>\nprintln(tail(MyString, 3))<br \/>\nprintln(tail(MyArray,4))<\/p>\n<p>Three Four<br \/>\n5<br \/>\nSix<br \/>\n[2, &#8220;Three&#8221;, &#8220;Four Five&#8221;, &#8220;six&#8221;]\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax tail(string|array, integer) Description The tail() function returns the last designated amount of lines from a string, or last amount of elements from an array. Lines in a string are deemed to be separated by a newline (\\n) Example MyString=&#8221;One\\n2\\nThree Four\\n5\\nSix&#8221; MyArray=[&#8220;One&#8221;, 2, &#8220;Three&#8221;, &#8220;Four Five&#8221;, &#8220;six&#8221;] println(tail(MyString, 3)) println(tail(MyArray,4)) Three Four 5 Six [2, &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-tail-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci tail() Function&#8221;<\/span><\/a><\/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-1022","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1022","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=1022"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1022\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1022\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}