Confidence Posted February 23, 2010 Share Posted February 23, 2010 hi, if i have an array like this Array ( [customers] => Private [tariffarray] => Array ( [0] => Array ( [provider] => EnerGen Süd eG [tarifName] => Privattarif [topseller] => ) [1] => Array ( [provider] => energiehoch3 GmbH [tarifName] => Strom³ [topseller] => ) [2] => Array ( [provider] => Energy2day GmbH [tarifName] => RegioPlus50 [topseller] => 1 ) } } and i want to move the element with [topseller] => 1 to the top (position 0)...something like $myarray ['tariffarray'][0] how do i do that? Quote Link to comment https://forums.phpfreaks.com/topic/193045-moving-array-member-to-top/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.