@@ -1363,6 +1363,71 @@ <h4 id="method_insert" class="method">insert(Array &$original, $value, $pos)
13631363 [5] => Jill
13641364)
13651365
1366+ </ code > </ pre >
1367+ </ td >
1368+ </ tr >
1369+ </ tbody >
1370+ </ table >
1371+ </ article >
1372+
1373+ < article >
1374+ < h4 id ="method_insert_assoc " class ="method "> insert_assoc(array &$original, array $values, $pos)</ h4 >
1375+ < p > The < strong > insert_assoc</ strong > method inserts elements into an associative array, at the specified position.< br />
1376+ < u > WARNING</ u > : The original array is edited by reference, only boolean success is returned.</ p >
1377+ < table class ="method ">
1378+ < tbody >
1379+ < tr >
1380+ < th class ="legend "> Static</ th >
1381+ < td > Yes</ td >
1382+ </ tr >
1383+ < tr >
1384+ < th > Parameters</ th >
1385+ < td >
1386+ < table class ="parameters ">
1387+ < tr >
1388+ < th > Param</ th >
1389+ < th > Default</ th >
1390+ < th class ="description "> Description</ th >
1391+ </ tr >
1392+ < tr >
1393+ < th > < kbd > $original</ kbd > </ th >
1394+ < td > < em > required</ em > </ td >
1395+ < td > The array to use</ td >
1396+ </ tr >
1397+ < tr >
1398+ < th > < kbd > $values</ kbd > </ th >
1399+ < td > < em > required</ em > </ td >
1400+ < td > Array with value(s) to insert</ td >
1401+ </ tr >
1402+ < tr >
1403+ < th > < kbd > $pos</ kbd > </ th >
1404+ < td > < em > required</ em > </ td >
1405+ < td >
1406+ The location in the original array where the new values should be inserted.
1407+ If a negative value is given, the position is counted from the back of the array.</ td >
1408+ </ tr >
1409+ </ table >
1410+ </ td >
1411+ </ tr >
1412+ < tr >
1413+ < th > Returns</ th >
1414+ < td > boolean, true on success, false if $pos is out of bounds.</ td >
1415+ </ tr >
1416+ < tr >
1417+ < th > Example</ th >
1418+ < td >
1419+ < pre class ="php "> < code > $character = array("name" => "Jack", "surname" => "Reacher");
1420+
1421+ Arr::insert_assoc($people, array("initial" => "P.");
1422+ print_r($people);
1423+
1424+ // Result:
1425+ Array
1426+ (
1427+ [name] => Jack
1428+ [initial] => P.
1429+ [surname] => Reacher
1430+ )
13661431</ code > </ pre >
13671432 </ td >
13681433 </ tr >
@@ -1372,8 +1437,8 @@ <h4 id="method_insert" class="method">insert(Array &$original, $value, $pos)
13721437
13731438 < article >
13741439 < h4 id ="method_insert_before_key " class ="method "> insert_before_key(Array &$original, $value, $key)</ h4 >
1375- < p > < strong > insert_before_key</ strong > メソッドは与えられたキーの手前に要素を1つ追加します。< br />
1376- < u > 警告 </ u > : 元の配列は参照渡しされるので直接書き換えられます。成功かどうかを表すブール値のみが返ります。</ p >
1440+ < p > The < strong > insert_before_key</ strong > メソッドは与えられたキーの手前に要素を1つ追加します。< br />
1441+ < u > WARNING </ u > : 元の配列は参照渡しされるので直接書き換えられます。成功かどうかを表すブール値のみが返ります。</ p >
13771442 < table class ="method ">
13781443 < tbody >
13791444 < tr >
@@ -1703,7 +1768,11 @@ <h4 id="method_multisort" class="method">multisort($array, $conditions, $ignore_
17031768 < tr >
17041769 < th > < kbd > $ornire_case</ kbd > </ th >
17051770 < td > < pre class ="php "> < code > false</ code > </ pre > </ td >
1771+ < < < < < < < HEAD
17061772 < td > 大文字/小文字を区別するかどうか。</ td >
1773+ =======
1774+ < td > Whether to sort case insensitive.</ td >
1775+ > > > > > > > 6a2b1d88d2f93780888954a75b63994f64bc7bda
17071776 </ tr >
17081777 </ table >
17091778 </ td >
@@ -1796,7 +1865,7 @@ <h4 id="method_multisort" class="method">multisort($array, $conditions, $ignore_
17961865
17971866 < article >
17981867 < h4 id ="method_in_array_recursive " class ="method "> in_array_recursive($needle, $haystack, $strict = false)</ h4 >
1799- < p > < strong > in_array_recursive</ strong > メソッドは値が配列に含まれているかどうか再帰的にチェックします。</ p >
1868+ < p > The < strong > in_array_recursive</ strong > メソッドは値が配列に含まれているかどうか再帰的にチェックします。</ p >
18001869 < table class ="method ">
18011870 < tbody >
18021871 < tr >
@@ -1934,6 +2003,90 @@ <h4 id="method_merge" class="method">merge($array)</h4>
19342003 [7] => 90
19352004 [8] => php
19362005)
2006+ </ code > </ pre >
2007+ </ td >
2008+ </ tr >
2009+ </ tbody >
2010+ </ table >
2011+ </ article >
2012+ < article >
2013+ < h4 id ="method_merge_assoc " class ="method "> merge_assoc($array)</ h4 >
2014+ < p > The < strong > merge_assoc</ strong > method merges 2 or more arrays recursively, differs in 2 important ways from array_merge_recursive(): < br />
2015+ - When there's 2 different values and not both arrays, the latter value overwrites the earlier
2016+ instead of merging both into an array< br />
2017+ - Numeric keys aren't changed</ p >
2018+ < table class ="method ">
2019+ < tbody >
2020+ < tr >
2021+ < th class ="legend "> Static</ th >
2022+ < td > Yes</ td >
2023+ </ tr >
2024+ < tr >
2025+ < th > Parameters</ th >
2026+ < td >
2027+ < table class ="parameters ">
2028+ < tr >
2029+ < th > Param</ th >
2030+ < th > Type</ th >
2031+ < th > Default</ th >
2032+ < th class ="description "> Description</ th >
2033+ </ tr >
2034+ < tr >
2035+ < th > < kbd > $array</ kbd > </ th >
2036+ < td > < em > array</ em > </ td >
2037+ < td > < em > required</ em > </ td >
2038+ < td > Multiple variables all of which must be arrays</ td >
2039+ </ tr >
2040+ </ table >
2041+ </ td >
2042+ </ tr >
2043+ < tr >
2044+ < th > Returns</ th >
2045+ < td > array</ td >
2046+ </ tr >
2047+ < tr >
2048+ < th > Throws</ th >
2049+ < td > < kbd > InvalidArgumentException</ kbd > when one of the passed arguments is no array.</ td >
2050+ </ tr >
2051+ < tr >
2052+ < th > Example</ th >
2053+ < td >
2054+ < pre class ="php "> < code > $arr1 = array(
2055+ 'one' => 1,
2056+ 2 => 2,
2057+ 3 => 3,
2058+ 4 => array(
2059+ 56
2060+ ),
2061+ 5=> 87
2062+ );
2063+
2064+ $arr2 = array(
2065+ 1 => 27,
2066+ 2 => 90,
2067+ 4 => array(
2068+ 'give_me' => 'bandwidth'
2069+ ),
2070+ 6 => '90',
2071+ 7 => 'php',
2072+ );
2073+
2074+ print_r( Arr::merge_assoc($arr1, $arr2) );
2075+ // Result:
2076+ Array
2077+ (
2078+ [one] => 1
2079+ [2] => 90
2080+ [3] => 3
2081+ [4] => Array (
2082+ [0] => 56
2083+ [give_me] => bandwidth
2084+ )
2085+ [5] => 87
2086+ [1] => 27
2087+ [6] => 90
2088+ [7] => php
2089+ )
19372090</ code > </ pre >
19382091 </ td >
19392092 </ tr >
@@ -2181,6 +2334,75 @@ <h4 id="method_sum" class="method">sum($array, $key)</h4>
21812334 </ table >
21822335 </ article >
21832336
2337+ < article >
2338+ < h4 id ="method_reindex " class ="method "> reindex($array)</ h4 >
2339+ < p > The < strong > reindex</ strong > method recusively re-indexes the numeric keys of an array. It will not alter string keys.</ p >
2340+ < table class ="method ">
2341+ < tbody >
2342+ < tr >
2343+ < th class ="legend "> Static</ th >
2344+ < td > Yes</ td >
2345+ </ tr >
2346+ < tr >
2347+ < th > Parameters</ th >
2348+ < td >
2349+ < table class ="parameters ">
2350+ < tr >
2351+ < th > Param</ th >
2352+ < th > Type</ th >
2353+ < th > Default</ th >
2354+ < th class ="description "> Description</ th >
2355+ </ tr >
2356+ < tr >
2357+ < th > < kbd > $array</ kbd > </ th >
2358+ < td > < em > array</ em > </ td >
2359+ < td > < em > required</ em > </ td >
2360+ < td > the array to re-index</ td >
2361+ </ tr >
2362+ </ table >
2363+ </ td >
2364+ </ tr >
2365+ < tr >
2366+ < th > Returns</ th >
2367+ < td > array</ td >
2368+ </ tr >
2369+ < tr >
2370+ < th > Example</ th >
2371+ < td >
2372+ < pre class ="php "> < code > $array = array(
2373+ 2 => 2,
2374+ 'three' => 3,
2375+ 5 => array(
2376+ 2 => 2,
2377+ 'three' => 3,
2378+ 5 => 5
2379+ ),
2380+ 7 => 7
2381+ );
2382+
2383+ // reindex the array
2384+ print_r( Arr::reindex($array) );
2385+ // Result:
2386+ Array
2387+ (
2388+ [0] => 2
2389+ [three] => 3
2390+ [1] => Array
2391+ (
2392+ [0] => 2
2393+ [three] => 3
2394+ [1] => 5
2395+ )
2396+
2397+ [2] => 7
2398+ )
2399+ </ code > </ pre >
2400+ </ td >
2401+ </ tr >
2402+ </ tbody >
2403+ </ table >
2404+ </ article >
2405+
21842406 < article >
21852407 < h4 id ="method_previous_by_key " class ="method "> previous_by_key($array, $key, $get_value = false, $strict = false)</ h4 >
21862408 < p > < strong > previous_by_key</ strong > メソッドを用いると、
0 commit comments