{"id":143,"date":"2018-07-12T10:04:41","date_gmt":"2018-07-12T10:04:41","guid":{"rendered":"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=143"},"modified":"2018-12-07T10:01:16","modified_gmt":"2018-12-07T10:01:16","slug":"array-ii","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/chapter\/array-ii\/","title":{"rendered":"Array &#8211; II"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/V1snnaoQwqA\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Multidimensional Array<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A multidimensional array is also known as 2-D (two-dimensional) array. It can be thought as array of arrays. A two dimensional array is a tabular array. Following figure helps you to understand 2-D array structure.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-145 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-89.png\" alt=\"\" width=\"95\" height=\"82\" \/>\r\n\r\nTo create the above array, the code is\r\n\r\n&nbsp;\r\n\r\n$stud = array(array(1,'Rajan'),\r\n\r\narray(2,'Haresh'),\r\n\r\narray(3,'Pankaj'));\r\n\r\n&nbsp;\r\n\r\nIn the above figure, ID and Name is considered as attributes of\u00a0 array $stud.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">To access the element of 2D array, two indexes values are required. The first index value refer to the outer array element and the second index value refer to the inner array element.<\/p>\r\n&nbsp;\r\n\r\nTo access the first index value of second array element index value , you have to code\r\n\r\n&nbsp;\r\n\r\necho \"&lt;br&gt; ID: \".$stud[1][0];\r\n\r\n&nbsp;\r\n\r\nThis will display ID: 2 on the browser.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">This array is considered as nested array also. Here, the nested array inside an outer array is of same size. The size of nested array is same, then such type of array is known as rectangular array. In case the size of nested array is different, then this type of array is known as jagged array.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-147 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-90.png\" alt=\"\" width=\"148\" height=\"101\" \/>\r\n\r\n&nbsp;\r\n\r\n$jugstud = array(array(1,'Rajan'),\r\n\r\narray(2,'Haresh','Mehta'),\r\n\r\narray(3,'Pankaj'),\r\n\r\n<span style=\"font-size: 1em;text-align: initial\">array('Mehul'));<\/span>\r\n\r\n<span style=\"font-size: 1em;text-align: center\">echo \"&lt;br&gt;\";<\/span>\r\n\r\n<span style=\"font-size: 1em\">foreach($jugstud as $outkey=&gt;$outval)<\/span>\r\n\r\n<span style=\"font-size: 1em\">{<\/span>\r\n\r\n<span style=\"font-size: 1em\">foreach($outval as $inkey=&gt;$inval)<\/span>\r\n\r\n<span style=\"font-size: 1em\">{<\/span>\r\n\r\n<span style=\"font-size: 1em\">echo '&lt;t&gt; '. $inval;<\/span>\r\n\r\n<span style=\"font-size: 1em\">\/\/echo '&lt;t&gt; '. 'outerkey : '. $outkey .' inkey :' .$inkey.' inval: '. $inval; \/\/ echo '&lt;t&gt; '.$inkey .' '. $inval; \/\/ this will print key as well\u00a0\u00a0<\/span><span style=\"font-size: 1em\">}<\/span>\r\n\r\n<span style=\"font-size: 1em\">echo \"&lt;br&gt;\";<\/span>\r\n\r\n<span style=\"font-size: 1em\">}<\/span>\r\n\r\n<\/div>\r\n<div>\r\n<p style=\"text-align: left\">\u00a0 You can create more than 2D array also in the same way.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-148 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-91.png\" alt=\"\" width=\"649\" height=\"413\" \/>\r\n\r\n<\/div>\r\n<strong>\u00a0<\/strong>\r\n<div>\r\n\r\n<img class=\"alignnone size-full wp-image-149 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-92.png\" alt=\"\" width=\"647\" height=\"323\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>To understand the functions let\u2019s write few programs.<\/strong>\r\n\r\n&nbsp;\r\n\r\n<strong>range functions in array<\/strong>\r\n\r\n&nbsp;\r\n\r\nrange function is used to create an array. The general syntax for range( ) function is range($lo, $hi [, $step]).\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The range function create an array with value start from $lo and fill the values to $hi by incement $step. If $step is omitted, then default $step 1.<\/p>\r\n&nbsp;\r\n\r\n$nums = range(1,10,1);\r\n\r\nforeach($nums as $n)\r\n\r\n{\r\n\r\necho \"&lt;t&gt; $n \";\r\n\r\n}\r\n\r\n&nbsp;\r\n\r\nThe above code create an array $nums having values 1,3,5,7,9.\r\n\r\n&nbsp;\r\n\r\n<strong>Array_push and Array_pop:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">These functions are called stack implementation in array. Stack structure is used LIFO (Last In First Out) approach.<\/p>\r\n&nbsp;\r\n\r\n$names = array(\"Hiren\",\"Vipul\",\"Vimal\");\r\n\r\narray_push($names,'Devdatt');\u00a0 \/\/ $names is \"Hiren\",\"Vipul\",\"Vimal\", \u201cDevdatt\u201d\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt;\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach($names as $name)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;t&gt; $name\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt;\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">$last = array_pop($names);\u00a0 \/\/$names is \"Hiren\",\"Vipul\",\"Vimal\"<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach($names as $name)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;t&gt; $name\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt; $last\";\u00a0 \/\/$last = \u201cDevdatt\u201d<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Array_unshift and Array_shift:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Array_push and array_shift functions are used to make queue implementation in array. Queue structure is used FIFO (First In First Out) approach.<\/p>\r\n&nbsp;\r\n\r\n\/\/array_unshift\r\n\r\narray_unshift($names,\"Kalpesh\");\u00a0 \/\/$names is Kalpesh Hiren Vipul Vimal\r\n\r\necho \"&lt;br&gt;\";\r\n\r\nforeach($names as $name)\r\n\r\n{\r\n\r\necho \"&lt;t&gt; $name\";\r\n\r\n}\r\n\r\n\/\/array shift\r\n\r\n$first = array_shift($names);\u00a0\u00a0 \/\/ $names is Hiren Vipul Vimal\r\n\r\necho \"&lt;br&gt;\";\r\n\r\nforeach($names as $name)\r\n\r\n{\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;t&gt; $name\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt; First : $first\";\u00a0 \/\/ First is Kalpesh<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Array_count_values function demo<\/strong>\r\n\r\n&nbsp;\r\n\r\necho \"&lt;br&gt;\";\r\n\r\n$friends = array(\"Hiren\",\"Vimal\",\"Vipul\",\"Vimal\",\"Devdatt\", \"Hiren\",\"Kalpesh\"); echo \"&lt;br&gt;\";\r\n\r\nforeach($friends as $fr)\r\n\r\n{\r\n\r\necho \"&lt;t&gt; $fr\";\r\n\r\n}\r\n\r\n$occurence = array_count_values($friends);\r\n<p style=\"text-align: justify\">echo \"&lt;br&gt; Hiren occurs $occurence[Hiren] times\";<\/p>\r\n<p style=\"text-align: justify\">echo \"&lt;br&gt; Vimal occurs $occurence[Vimal] times\";<\/p>\r\n<p style=\"text-align: justify\">echo \"&lt;br&gt; Vipul occurs $occurence[Vipul] times\";<\/p>\r\n<p style=\"text-align: justify\">echo \"&lt;br&gt; Devdatt occurs $occurence[Devdatt] times\";<\/p>\r\n<p style=\"text-align: justify\">echo \"&lt;br&gt; Kalpesh occurs $occurence[Kalpesh] times\";<\/p>\r\n&nbsp;\r\n\r\nThen the output will be\r\n\r\n&nbsp;\r\n\r\nHiren Vimal Vipul Vimal Devdatt Hiren Kalpesh\r\n\r\nHiren occurs 2 times\r\n\r\nVimal occurs 2 times\r\n\r\nVipul occurs 1 times\r\n\r\nDevdatt occurs 1 times\r\n\r\nKalpesh occurs 1 times\r\n\r\n&nbsp;\r\n\r\n<strong>Sort function demo<\/strong>\r\n\r\n&nbsp;\r\n\r\n$emp = array('Heena','Yatin','Chirag','Siddhi','Divya');\r\n\r\necho \"&lt;br&gt; Before sorting an array &lt;br&gt;\";\r\n\r\nforeach ($emp as $e)\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;t&gt; $e\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">sort($emp);<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt; After sorting an array &lt;br&gt;\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach ($emp as $e)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;t&gt; $e\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Then the output will be<\/strong>\r\n\r\n&nbsp;\r\n\r\nBefore sorting an array\r\n\r\nHeena Yatin Chirag Siddhi Divya\r\n\r\nAfter sorting an array\r\n\r\nChirag Divya Heena Siddhi Yatin\r\n\r\n&nbsp;\r\n\r\n<strong>rsort demo<\/strong>\r\n\r\n&nbsp;\r\n\r\nrsort($emp);\r\n\r\necho \"&lt;br&gt; Reverse Sorting &lt;br&gt;\";\r\n\r\nforeach ($emp as $e)\r\n\r\n{\r\n\r\necho \"&lt;t&gt; $e\";\r\n\r\n}\r\n\r\n&nbsp;\r\n\r\n<strong>Output will be<\/strong>\r\n\r\n&nbsp;\r\n\r\nReverse Sorting\r\n\r\nYatin Siddhi Heena Divya Chirag\r\n\r\n&nbsp;\r\n\r\n<strong>ksort demo<\/strong>\r\n\r\n&nbsp;\r\n\r\n&lt;?php\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">$milk = array('gold'=&gt;24,'diamond'=&gt;26,'taza'=&gt;20,'shakti'=&gt;22);<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt; Before sorting an array &lt;br&gt;\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach ($milk as $m=&gt;$v)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt; $m price is Rs. $v\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">ksort($milk);<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt;&lt;br&gt; After ksort an array: \";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach ($milk as $m=&gt;$v)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt; $m price is Rs. $v\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">?&gt;<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Output will be<\/strong>\r\n\r\n&nbsp;\r\n\r\nBefore sorting an array\r\n\r\ngold price is Rs. 24\r\n\r\ndiamond price is Rs. 26\r\n\r\ntaza price is Rs. 20\r\n\r\nshakti price is Rs. 22\r\n\r\nAfter ksort an array:\r\n\r\ndiamond price is Rs. 26\r\n\r\ngold price is Rs. 24\r\n\r\nshakti price is Rs. 22\r\n\r\ntaza price is Rs. 20\r\n\r\n&nbsp;\r\n\r\n<strong>Shuffle function example.<\/strong>\r\n\r\n&nbsp;\r\n\r\n&lt;?php\r\n\r\n\/\/Shuffle demo\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;br&gt;&lt;br&gt;\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">$values = array('2','3','4','5','6','7','8','9','10','J','Q','K','A'); $types = array('C','D','H','S');<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo '&lt;br&gt; The playing card are &lt;br&gt;';<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">$cards = array();<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach($types as $t)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach($values as $v)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">$cards[] = $t.$v;<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">foreach($cards as $card)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo \"&lt;t&gt; $card\";<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo '&lt;br&gt; After shuffle the 5 cards are &lt;br&gt; ';<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">shuffle($cards);<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">$hand = array();<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">for($i =0; $i&lt;5;$i++)<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">{<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">$hand[] = array_shift($cards);<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">}<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">echo implode(' ',$hand);<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">?&gt;<\/span>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\n<strong>When you execute the function, then the Output can be<\/strong>\r\n\r\n&nbsp;\r\n\r\nThe playing card are\r\n\r\n&nbsp;\r\n\r\nC2 C3 C4 C5 C6 C7 C8 C9 C10 CJ CQ CK CA D2 D3 D4 D5 D6 D7 D8 D9 D10 DJ DQ DK DA H2 H3 H4 H5 H6\r\n\r\n&nbsp;\r\n\r\nH7 H8 H9 H10 HJ HQ HK HA S2 S3 S4 S5 S6 S7 S8 S9 S10 SJ SQ SK SA\r\n\r\n&nbsp;\r\n\r\nAfter shuffle the 5 cards are\r\n\r\n&nbsp;\r\n\r\nS7 H4 D3 CJ HQ\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Array \u2013 II<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/V1snnaoQwqA\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<strong>References:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">1. Luke Welling, Laura Thomson: PHP and MySQL Web Development, Pearson,<\/p>\r\n<p style=\"text-align: justify\">2. W. Jason Gilmore: Beginning PHP and MySQL 5 From Novice to Professional,Apress<\/p>\r\n<p style=\"text-align: justify\">3. Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K.Glass: Beginning PHP5, Apache, and MySQL Web Development, Wrox,<\/p>\r\n<p style=\"text-align: justify\">4. Robin Nixon: Learning PHP, MySQL, and JavaScript, O'Reilly Media<\/p>\r\n<p style=\"text-align: justify\">5. Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove:Professional PHP, Wrox<\/p>\r\n<p style=\"text-align: justify\">6. Tim Converse, Joyce Park, Clark Morgan: PHP5 and MySQL Bible<\/p>\r\n<p style=\"text-align: justify\">7. Joel Murach, Ray Harris: Murach\u2019s PHP and MySQL, Shroff\/Murach<\/p>\r\n<p style=\"text-align: justify\">8. Ivan Bayross, Web Enabled Commercial Application Development Using HTML\/Javascript\/DHTML\/PHP , BPB Publications<\/p>\r\n<p style=\"text-align: justify\">9. Julie C. Meloni, Sams Teach Yourself PHP, MySQL and Apache All in One, Sams<\/p>\r\n<p style=\"text-align: justify\">10. Larry Ullman, PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide,Pearson Education<\/p>\r\n<p style=\"text-align: justify\">11. http:\/\/www.php.net<\/p>\r\n<p style=\"text-align: justify\">12. http:\/\/www.w3schools.com\/<\/p>\r\n<p style=\"text-align: justify\">13. http:\/\/www.tutorialspoint.com\/<\/p>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/V1snnaoQwqA\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Multidimensional Array<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A multidimensional array is also known as 2-D (two-dimensional) array. It can be thought as array of arrays. A two dimensional array is a tabular array. Following figure helps you to understand 2-D array structure.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-145 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-89.png\" alt=\"\" width=\"95\" height=\"82\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-89.png 95w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-89-65x56.png 65w\" sizes=\"auto, (max-width: 95px) 100vw, 95px\" \/><\/p>\n<p>To create the above array, the code is<\/p>\n<p>&nbsp;<\/p>\n<p>$stud = array(array(1,&#8217;Rajan&#8217;),<\/p>\n<p>array(2,&#8217;Haresh&#8217;),<\/p>\n<p>array(3,&#8217;Pankaj&#8217;));<\/p>\n<p>&nbsp;<\/p>\n<p>In the above figure, ID and Name is considered as attributes of\u00a0 array $stud.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To access the element of 2D array, two indexes values are required. The first index value refer to the outer array element and the second index value refer to the inner array element.<\/p>\n<p>&nbsp;<\/p>\n<p>To access the first index value of second array element index value , you have to code<\/p>\n<p>&nbsp;<\/p>\n<p>echo &#8220;&lt;br&gt; ID: &#8220;.$stud[1][0];<\/p>\n<p>&nbsp;<\/p>\n<p>This will display ID: 2 on the browser.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">This array is considered as nested array also. Here, the nested array inside an outer array is of same size. The size of nested array is same, then such type of array is known as rectangular array. In case the size of nested array is different, then this type of array is known as jagged array.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-147 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-90.png\" alt=\"\" width=\"148\" height=\"101\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-90.png 148w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-90-65x44.png 65w\" sizes=\"auto, (max-width: 148px) 100vw, 148px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>$jugstud = array(array(1,&#8217;Rajan&#8217;),<\/p>\n<p>array(2,&#8217;Haresh&#8217;,&#8217;Mehta&#8217;),<\/p>\n<p>array(3,&#8217;Pankaj&#8217;),<\/p>\n<p><span style=\"font-size: 1em;text-align: initial\">array(&#8216;Mehul&#8217;));<\/span><\/p>\n<p><span style=\"font-size: 1em;text-align: center\">echo &#8220;&lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"font-size: 1em\">foreach($jugstud as $outkey=&gt;$outval)<\/span><\/p>\n<p><span style=\"font-size: 1em\">{<\/span><\/p>\n<p><span style=\"font-size: 1em\">foreach($outval as $inkey=&gt;$inval)<\/span><\/p>\n<p><span style=\"font-size: 1em\">{<\/span><\/p>\n<p><span style=\"font-size: 1em\">echo &#8216;&lt;t&gt; &#8216;. $inval;<\/span><\/p>\n<p><span style=\"font-size: 1em\">\/\/echo &#8216;&lt;t&gt; &#8216;. &#8216;outerkey : &#8216;. $outkey .&#8217; inkey :&#8217; .$inkey.&#8217; inval: &#8216;. $inval; \/\/ echo &#8216;&lt;t&gt; &#8216;.$inkey .&#8217; &#8216;. $inval; \/\/ this will print key as well\u00a0\u00a0<\/span><span style=\"font-size: 1em\">}<\/span><\/p>\n<p><span style=\"font-size: 1em\">echo &#8220;&lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"font-size: 1em\">}<\/span><\/p>\n<\/div>\n<div>\n<p style=\"text-align: left\">\u00a0 You can create more than 2D array also in the same way.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-148 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-91.png\" alt=\"\" width=\"649\" height=\"413\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-91.png 649w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-91-300x191.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-91-65x41.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-91-225x143.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-91-350x223.png 350w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/p>\n<\/div>\n<p><strong>\u00a0<\/strong><\/p>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-149 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-92.png\" alt=\"\" width=\"647\" height=\"323\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-92.png 647w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-92-300x150.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-92-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-92-225x112.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-92-350x175.png 350w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>To understand the functions let\u2019s write few programs.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>range functions in array<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>range function is used to create an array. The general syntax for range( ) function is range($lo, $hi [, $step]).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The range function create an array with value start from $lo and fill the values to $hi by incement $step. If $step is omitted, then default $step 1.<\/p>\n<p>&nbsp;<\/p>\n<p>$nums = range(1,10,1);<\/p>\n<p>foreach($nums as $n)<\/p>\n<p>{<\/p>\n<p>echo &#8220;&lt;t&gt; $n &#8220;;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>The above code create an array $nums having values 1,3,5,7,9.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Array_push and Array_pop:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">These functions are called stack implementation in array. Stack structure is used LIFO (Last In First Out) approach.<\/p>\n<p>&nbsp;<\/p>\n<p>$names = array(&#8220;Hiren&#8221;,&#8221;Vipul&#8221;,&#8221;Vimal&#8221;);<\/p>\n<p>array_push($names,&#8217;Devdatt&#8217;);\u00a0 \/\/ $names is &#8220;Hiren&#8221;,&#8221;Vipul&#8221;,&#8221;Vimal&#8221;, \u201cDevdatt\u201d<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach($names as $name)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;t&gt; $name&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">$last = array_pop($names);\u00a0 \/\/$names is &#8220;Hiren&#8221;,&#8221;Vipul&#8221;,&#8221;Vimal&#8221;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach($names as $name)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;t&gt; $name&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt; $last&#8221;;\u00a0 \/\/$last = \u201cDevdatt\u201d<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Array_unshift and Array_shift:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Array_push and array_shift functions are used to make queue implementation in array. Queue structure is used FIFO (First In First Out) approach.<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/array_unshift<\/p>\n<p>array_unshift($names,&#8221;Kalpesh&#8221;);\u00a0 \/\/$names is Kalpesh Hiren Vipul Vimal<\/p>\n<p>echo &#8220;&lt;br&gt;&#8221;;<\/p>\n<p>foreach($names as $name)<\/p>\n<p>{<\/p>\n<p>echo &#8220;&lt;t&gt; $name&#8221;;<\/p>\n<p>}<\/p>\n<p>\/\/array shift<\/p>\n<p>$first = array_shift($names);\u00a0\u00a0 \/\/ $names is Hiren Vipul Vimal<\/p>\n<p>echo &#8220;&lt;br&gt;&#8221;;<\/p>\n<p>foreach($names as $name)<\/p>\n<p>{<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;t&gt; $name&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt; First : $first&#8221;;\u00a0 \/\/ First is Kalpesh<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Array_count_values function demo<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>echo &#8220;&lt;br&gt;&#8221;;<\/p>\n<p>$friends = array(&#8220;Hiren&#8221;,&#8221;Vimal&#8221;,&#8221;Vipul&#8221;,&#8221;Vimal&#8221;,&#8221;Devdatt&#8221;, &#8220;Hiren&#8221;,&#8221;Kalpesh&#8221;); echo &#8220;&lt;br&gt;&#8221;;<\/p>\n<p>foreach($friends as $fr)<\/p>\n<p>{<\/p>\n<p>echo &#8220;&lt;t&gt; $fr&#8221;;<\/p>\n<p>}<\/p>\n<p>$occurence = array_count_values($friends);<\/p>\n<p style=\"text-align: justify\">echo &#8220;&lt;br&gt; Hiren occurs $occurence[Hiren] times&#8221;;<\/p>\n<p style=\"text-align: justify\">echo &#8220;&lt;br&gt; Vimal occurs $occurence[Vimal] times&#8221;;<\/p>\n<p style=\"text-align: justify\">echo &#8220;&lt;br&gt; Vipul occurs $occurence[Vipul] times&#8221;;<\/p>\n<p style=\"text-align: justify\">echo &#8220;&lt;br&gt; Devdatt occurs $occurence[Devdatt] times&#8221;;<\/p>\n<p style=\"text-align: justify\">echo &#8220;&lt;br&gt; Kalpesh occurs $occurence[Kalpesh] times&#8221;;<\/p>\n<p>&nbsp;<\/p>\n<p>Then the output will be<\/p>\n<p>&nbsp;<\/p>\n<p>Hiren Vimal Vipul Vimal Devdatt Hiren Kalpesh<\/p>\n<p>Hiren occurs 2 times<\/p>\n<p>Vimal occurs 2 times<\/p>\n<p>Vipul occurs 1 times<\/p>\n<p>Devdatt occurs 1 times<\/p>\n<p>Kalpesh occurs 1 times<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Sort function demo<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>$emp = array(&#8216;Heena&#8217;,&#8217;Yatin&#8217;,&#8217;Chirag&#8217;,&#8217;Siddhi&#8217;,&#8217;Divya&#8217;);<\/p>\n<p>echo &#8220;&lt;br&gt; Before sorting an array &lt;br&gt;&#8221;;<\/p>\n<p>foreach ($emp as $e)<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;t&gt; $e&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">sort($emp);<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt; After sorting an array &lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach ($emp as $e)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;t&gt; $e&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Then the output will be<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Before sorting an array<\/p>\n<p>Heena Yatin Chirag Siddhi Divya<\/p>\n<p>After sorting an array<\/p>\n<p>Chirag Divya Heena Siddhi Yatin<\/p>\n<p>&nbsp;<\/p>\n<p><strong>rsort demo<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>rsort($emp);<\/p>\n<p>echo &#8220;&lt;br&gt; Reverse Sorting &lt;br&gt;&#8221;;<\/p>\n<p>foreach ($emp as $e)<\/p>\n<p>{<\/p>\n<p>echo &#8220;&lt;t&gt; $e&#8221;;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Output will be<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Reverse Sorting<\/p>\n<p>Yatin Siddhi Heena Divya Chirag<\/p>\n<p>&nbsp;<\/p>\n<p><strong>ksort demo<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&lt;?php<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">$milk = array(&#8216;gold&#8217;=&gt;24,&#8217;diamond&#8217;=&gt;26,&#8217;taza&#8217;=&gt;20,&#8217;shakti&#8217;=&gt;22);<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt; Before sorting an array &lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach ($milk as $m=&gt;$v)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt; $m price is Rs. $v&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">ksort($milk);<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt;&lt;br&gt; After ksort an array: &#8220;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach ($milk as $m=&gt;$v)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt; $m price is Rs. $v&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">?&gt;<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Output will be<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Before sorting an array<\/p>\n<p>gold price is Rs. 24<\/p>\n<p>diamond price is Rs. 26<\/p>\n<p>taza price is Rs. 20<\/p>\n<p>shakti price is Rs. 22<\/p>\n<p>After ksort an array:<\/p>\n<p>diamond price is Rs. 26<\/p>\n<p>gold price is Rs. 24<\/p>\n<p>shakti price is Rs. 22<\/p>\n<p>taza price is Rs. 20<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Shuffle function example.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&lt;?php<\/p>\n<p>\/\/Shuffle demo<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;br&gt;&lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">$values = array(&#8216;2&#8242;,&#8217;3&#8242;,&#8217;4&#8242;,&#8217;5&#8242;,&#8217;6&#8242;,&#8217;7&#8242;,&#8217;8&#8242;,&#8217;9&#8242;,&#8217;10&#8217;,&#8217;J&#8217;,&#8217;Q&#8217;,&#8217;K&#8217;,&#8217;A&#8217;); $types = array(&#8216;C&#8217;,&#8217;D&#8217;,&#8217;H&#8217;,&#8217;S&#8217;);<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8216;&lt;br&gt; The playing card are &lt;br&gt;&#8217;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">$cards = array();<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach($types as $t)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach($values as $v)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">$cards[] = $t.$v;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">foreach($cards as $card)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8220;&lt;t&gt; $card&#8221;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo &#8216;&lt;br&gt; After shuffle the 5 cards are &lt;br&gt; &#8216;;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">shuffle($cards);<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">$hand = array();<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">for($i =0; $i&lt;5;$i++)<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">{<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">$hand[] = array_shift($cards);<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">}<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">echo implode(&#8216; &#8216;,$hand);<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">?&gt;<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>When you execute the function, then the Output can be<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>The playing card are<\/p>\n<p>&nbsp;<\/p>\n<p>C2 C3 C4 C5 C6 C7 C8 C9 C10 CJ CQ CK CA D2 D3 D4 D5 D6 D7 D8 D9 D10 DJ DQ DK DA H2 H3 H4 H5 H6<\/p>\n<p>&nbsp;<\/p>\n<p>H7 H8 H9 H10 HJ HQ HK HA S2 S3 S4 S5 S6 S7 S8 S9 S10 SJ SQ SK SA<\/p>\n<p>&nbsp;<\/p>\n<p>After shuffle the 5 cards are<\/p>\n<p>&nbsp;<\/p>\n<p>S7 H4 D3 CJ HQ<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Array \u2013 II<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/V1snnaoQwqA\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>References:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1. Luke Welling, Laura Thomson: PHP and MySQL Web Development, Pearson,<\/p>\n<p style=\"text-align: justify\">2. W. Jason Gilmore: Beginning PHP and MySQL 5 From Novice to Professional,Apress<\/p>\n<p style=\"text-align: justify\">3. Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K.Glass: Beginning PHP5, Apache, and MySQL Web Development, Wrox,<\/p>\n<p style=\"text-align: justify\">4. Robin Nixon: Learning PHP, MySQL, and JavaScript, O&#8217;Reilly Media<\/p>\n<p style=\"text-align: justify\">5. Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove:Professional PHP, Wrox<\/p>\n<p style=\"text-align: justify\">6. Tim Converse, Joyce Park, Clark Morgan: PHP5 and MySQL Bible<\/p>\n<p style=\"text-align: justify\">7. Joel Murach, Ray Harris: Murach\u2019s PHP and MySQL, Shroff\/Murach<\/p>\n<p style=\"text-align: justify\">8. Ivan Bayross, Web Enabled Commercial Application Development Using HTML\/Javascript\/DHTML\/PHP , BPB Publications<\/p>\n<p style=\"text-align: justify\">9. Julie C. Meloni, Sams Teach Yourself PHP, MySQL and Apache All in One, Sams<\/p>\n<p style=\"text-align: justify\">10. Larry Ullman, PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide,Pearson Education<\/p>\n<p style=\"text-align: justify\">11. http:\/\/www.php.net<\/p>\n<p style=\"text-align: justify\">12. http:\/\/www.w3schools.com\/<\/p>\n<p style=\"text-align: justify\">13. http:\/\/www.tutorialspoint.com\/<\/p>\n","protected":false},"author":3,"menu_order":9,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-hiren-joshi"],"pb_section_license":""},"chapter-type":[],"contributor":[59],"license":[],"class_list":["post-143","chapter","type-chapter","status-publish","hentry","contributor-dr-hiren-joshi"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":8,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/143\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/143\/revisions\/146"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/143\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapter-type?post=143"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/contributor?post=143"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/license?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}