@@ -49,6 +49,71 @@ <h2>Arr Class</h2>
49
49
50
50
< p > The arr class is a set of helper functions for working with arrays.</ p >
51
51
52
+ < article >
53
+ < h4 class ="method " id ="method_is_multi "> is_multi($arr, $all_keys = false)</ h4 >
54
+ < p > The < strong > is_multi</ strong > method checks if the array passed is multi-dimensional array or not.</ p >
55
+ < table class ="method ">
56
+ < tbody >
57
+ < tr >
58
+ < th class ="legend "> Static</ th >
59
+ < td > Yes</ td >
60
+ </ tr >
61
+ < tr >
62
+ < th > Parameters</ th >
63
+ < td >
64
+ < table class ="parameters ">
65
+ < tr >
66
+ < th > Param</ th >
67
+ < th > Default</ th >
68
+ < th class ="description "> Description</ th >
69
+ </ tr >
70
+ < tr >
71
+ < th > < kbd > $arr</ kbd > </ th >
72
+ < td > < em > required</ em > </ td >
73
+ < td > The array to check.</ td >
74
+ </ tr >
75
+ < tr >
76
+ < th > < kbd > $all_keys</ kbd > </ th >
77
+ < td >
78
+ < pre class ="php "> < span class ="keyword "> false</ span > </ pre >
79
+ </ td >
80
+ < td > Check that all elements are arrays.</ td >
81
+ </ tr >
82
+ </ table >
83
+ </ td >
84
+ </ tr >
85
+ < tr >
86
+ < th > Returns</ th >
87
+ < td > bool</ td >
88
+ </ tr >
89
+ < tr >
90
+ < th > Example</ th >
91
+ < td >
92
+ < pre class ="php "> < code >
93
+ // Single array
94
+ $arr = array('one' => 1, 'two' => 2);
95
+ Arr::is_multi($arr);
96
+ // Result: false
97
+
98
+
99
+ // Multi-dimensional array
100
+ $arr = array('one' => array('test' => 1), 'two' => array('test' => 2), 'three' => array('test' => 3));
101
+ Arr::is_multi($arr);
102
+ // Result: true
103
+
104
+
105
+ // Multi-dimensional array with elements check
106
+ $arr = array('one' => array('test' => 1), 'two' => array('test' => 2), 'three' => 3);
107
+
108
+ Arr::is_multi($arr, false); // Result: true
109
+ Arr::is_multi($arr, true); // Result: false
110
+ </ code > </ pre >
111
+ </ td >
112
+ </ tr >
113
+ </ tbody >
114
+ </ table >
115
+ </ article >
116
+
52
117
< article >
53
118
< h4 class ="method " id ="method_is_assoc "> is_assoc($arr)</ h4 >
54
119
< p > The < strong > is_assoc</ strong > method checks if the array passed is an associative array or not.</ p >
0 commit comments