{"id":3206,"date":"2015-04-27T08:58:49","date_gmt":"2015-04-27T08:58:49","guid":{"rendered":"http:\/\/tutorialsclass.com\/?post_type=faq&#038;p=3206"},"modified":"2020-04-27T10:54:04","modified_gmt":"2020-04-27T10:54:04","slug":"use-of-array-chunk-function-in-php","status":"publish","type":"faq","link":"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/","title":{"rendered":"What is the use of array_chunk() function in PHP?"},"content":{"rendered":"\n<p>The <code>array_chunk()<\/code> function is used to split an array into parts or chunks of new arrays. Example: <code>array_chunk(array,size);<\/code><\/p>\n\n\n\n<p>The first parameter specifies an array and the second parameter defines the size of each chunk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The array_chunk() function is used to split an array into parts or chunks of new arrays. Example: array_chunk(array,size); The first parameter specifies an array and the second parameter defines the size of&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"faq_type":[122,87,93],"keywords":[],"class_list":["post-3206","faq","type-faq","status-publish","hentry","faq_type-all-php-interview-questions-answers","faq_type-php-array-interview-questions-answers","faq_type-php-interview-questions-answers-for-freshers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is the use of array_chunk() function in PHP?<\/title>\n<meta name=\"description\" content=\"What is the use of array_chunk() function in PHP? The array_chunk() function is used to split an array into parts or chunks of new arrays. Check example here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the use of array_chunk() function in PHP?\" \/>\n<meta property=\"og:description\" content=\"What is the use of array_chunk() function in PHP? The array_chunk() function is used to split an array into parts or chunks of new arrays. Check example here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorials Class\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/tutorialsclass\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-27T10:54:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/07\/tutorials-class-logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@TutorialsClass\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/\",\"url\":\"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/\",\"name\":\"What is the use of array_chunk() function in PHP?\",\"isPartOf\":{\"@id\":\"https:\/\/tutorialsclass.com\/#website\"},\"datePublished\":\"2015-04-27T08:58:49+00:00\",\"dateModified\":\"2020-04-27T10:54:04+00:00\",\"description\":\"What is the use of array_chunk() function in PHP? The array_chunk() function is used to split an array into parts or chunks of new arrays. Check example here.\",\"breadcrumb\":{\"@id\":\"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tutorialsclass.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FAQs\",\"item\":\"https:\/\/tutorialsclass.com\/faq\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Career\",\"item\":\"https:\/\/tutorialsclass.com\/articles\/career\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"What is the use of array_chunk() function in PHP?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tutorialsclass.com\/#website\",\"url\":\"https:\/\/tutorialsclass.com\/\",\"name\":\"Tutorials Class\",\"description\":\"Online Tutorials for Beginners\",\"publisher\":{\"@id\":\"https:\/\/tutorialsclass.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tutorialsclass.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/tutorialsclass.com\/#organization\",\"name\":\"Tutorials Class\",\"url\":\"https:\/\/tutorialsclass.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png\",\"contentUrl\":\"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png\",\"width\":442,\"height\":94,\"caption\":\"Tutorials Class\"},\"image\":{\"@id\":\"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/tutorialsclass\",\"https:\/\/x.com\/TutorialsClass\",\"https:\/\/in.pinterest.com\/merientinfotech\/boards\/\",\"https:\/\/www.youtube.com\/channel\/UCzbpQXlqec-bQf1_kwrTuoA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the use of array_chunk() function in PHP?","description":"What is the use of array_chunk() function in PHP? The array_chunk() function is used to split an array into parts or chunks of new arrays. Check example here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/","og_locale":"en_US","og_type":"article","og_title":"What is the use of array_chunk() function in PHP?","og_description":"What is the use of array_chunk() function in PHP? The array_chunk() function is used to split an array into parts or chunks of new arrays. Check example here.","og_url":"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/","og_site_name":"Tutorials Class","article_publisher":"https:\/\/www.facebook.com\/tutorialsclass","article_modified_time":"2020-04-27T10:54:04+00:00","og_image":[{"width":600,"height":600,"url":"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/07\/tutorials-class-logo.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@TutorialsClass","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/","url":"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/","name":"What is the use of array_chunk() function in PHP?","isPartOf":{"@id":"https:\/\/tutorialsclass.com\/#website"},"datePublished":"2015-04-27T08:58:49+00:00","dateModified":"2020-04-27T10:54:04+00:00","description":"What is the use of array_chunk() function in PHP? The array_chunk() function is used to split an array into parts or chunks of new arrays. Check example here.","breadcrumb":{"@id":"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/tutorialsclass.com\/faq\/use-of-array-chunk-function-in-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tutorialsclass.com\/"},{"@type":"ListItem","position":2,"name":"FAQs","item":"https:\/\/tutorialsclass.com\/faq\/"},{"@type":"ListItem","position":3,"name":"Career","item":"https:\/\/tutorialsclass.com\/articles\/career\/"},{"@type":"ListItem","position":4,"name":"What is the use of array_chunk() function in PHP?"}]},{"@type":"WebSite","@id":"https:\/\/tutorialsclass.com\/#website","url":"https:\/\/tutorialsclass.com\/","name":"Tutorials Class","description":"Online Tutorials for Beginners","publisher":{"@id":"https:\/\/tutorialsclass.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tutorialsclass.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/tutorialsclass.com\/#organization","name":"Tutorials Class","url":"https:\/\/tutorialsclass.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/","url":"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png","contentUrl":"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png","width":442,"height":94,"caption":"Tutorials Class"},"image":{"@id":"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/tutorialsclass","https:\/\/x.com\/TutorialsClass","https:\/\/in.pinterest.com\/merientinfotech\/boards\/","https:\/\/www.youtube.com\/channel\/UCzbpQXlqec-bQf1_kwrTuoA"]}]}},"_links":{"self":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/faq\/3206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/comments?post=3206"}],"version-history":[{"count":2,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/faq\/3206\/revisions"}],"predecessor-version":[{"id":5700,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/faq\/3206\/revisions\/5700"}],"wp:attachment":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/media?parent=3206"}],"wp:term":[{"taxonomy":"faq_type","embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/faq_type?post=3206"},{"taxonomy":"keywords","embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/keywords?post=3206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}