What is the way to change the first subscript of an array, and use Dump () to print out a new subscript. The code is as follows
PHP Code
Array ( 1 = = Array ( 0 = = Array ( ' created ' = = integer 1332383287 ' updated ' = = integer 1332385146 ' id ' = ' + String ' (length=2) ' level ' = = ' tag_id ' = ' 1 ' status ' = = integer 0 ' creator_uid ' = = integer 6 ' assign_uid ' = = integer 6 ' assign_history ' = = String ' |6| | 6|6| ' (length=8) ' Title ' = = String ' [iBay365] ' (length=10) ' context ' = = String ')) //requirement is "1 = = Array (0=> , Array (...)) " This 1 becomes php or Ajax text, and then once again with the dump ()//becomes the "PHP = = Array (0=>array (...))" Ask what method can do, I think for a long while really can't think out, manual also check//seemingly no such function, to you can help, thank you
------Solution--------------------
By deleting and merging, you probably don't have a function that directly implements this function.
PHP Code
$key = ...; $arr = Array_merge (Array ($key = Array_shift ($arr)), $arr);
------Solution--------------------
For a bit.
------Solution--------------------
Re-construct an array.
------Solution--------------------
PHP Code
$ar 1 = Array (1 = = Array (' 111 '), 6 = = Array (' 666 '), 2 = = Array (' 222 ')), $ar 2 = Array (' PHP ', ' AJAX ', ' MySQL '); $ar 2 = Array_combine ($ar 2, Array_values ($ar 1)), Echo '';p Rint_r ($ar 2);
------Solution--------------------
PHP Code
[[email protected] csdn]$ php exchange.php Array ([PHP]/= Array ([0] = index 1) [ AJAX] = = Array ([0] = = Index 6) [MySQL] = Array ([0] = = Inde x 2)) [[email protected] csdn]$ cat exchange.php
Array ("Index 1"), 6 = a Rray ("index 6"), 2 = AR Ray ("Index 2")), $arr 2 = Array ( ' PHP ' = = Array (), ' AJAX ' = = Array (), ' MySQL ' => ; Array ()); $arr 2 = Array_combine (Array_keys ($arr 2), Array_values ($arr 1));p Rint_r ($arr 2);? >