Array (' id ' = 3, ' username ' = ' Alex ', ' parentname ' = ' John '
, ' proname ' = ' tttt ' num ' = 1, ' userid ' =>6, ' ParentID ' =>8,
' Cpid ' = 0, ' mobile ' = 15533336666, ' parentmobile ' and ' + 156477765465 ';
Put the last two in the 2nd and 4th positions, how do I reorder each other?
Array (' id ' = 3, ' username ' = ' Alex ', ' mobile ' and ' = 15533336666
, ' parentname ' = ' john ', ' Parentmobile ' and ' 156477765465 ', ' proname ' = ' tttt ' num ' = 1,
' UserID ' =>6, ' parentid ' =>8, ' cpid ' + 0);
Reply to discussion (solution)
$a = Array ( ' id ' = 3, ' username ' = ' Alex ', ' parentname ' = ' john ', ' proname ' = ' tttt ',
' num ' = 1, ' userid ' =>6, ' ParentID ' =>8, ' cpid ' = + 0, ' mobile ' and 15533336666, ' c10/> ' parentmobile ' = 156477765465); $k = Array ( ' id ', ' username ', ' mobile ', ' ParentName ', ' Parentmobile ', ' proname ', ' num ', ' userid ', ' parentid ', ' cpid ', ' mobile ', ; extract ($a); $b = Compact ($k); Var_export ($b);
Array ( ' id ' = + 3, ' username ' = ' Alex ', ' mobile ' = 15533336666, ' parentname ' = ' John ', ' parentmobile ' = ' 156477765465, ' proname ' = ' tttt ', ' num ' = 1, ' userid ' and ' 6, ' parentid ' = 8, ' cpid ' and ' 0, '
Thank you, can you use only foreach to achieve it without extract and compact? Thank you.
If there is no sample, it is impossible to complete
What's the point of having a sample and sticking to the form?