This is by far one of the most comprehensible and easy to understand videos that I've seen on this. And trust me, i've watched a lot over the past two days. Thank you.
@diy-speaker2 жыл бұрын
The best video for multidimensional array sorting by so far. Bless you!
@john.morris2 жыл бұрын
Thanks. They were always a bear for me. 🙂
@attilabalog21695 жыл бұрын
ohh man...i know this is an old video, but still THANK YOU!!!! you saved me lots of headache!!!! Cheers!!!
@adrianquintana67992 жыл бұрын
Gracias 😁
@la_place6846 жыл бұрын
Thank you, that is exactly what i was looking for - for hours!
@rayvnm15776 жыл бұрын
Thank you so much! I had to make slight tweak since numeric indices surfaced 'offset' errors. This is the tweak - just in case someone is running into the same issue: $b[$k] and $c[$k].
@john.morris6 жыл бұрын
No problem. Glad it helped. Thanks for sharing your tweak!
@GilbertBigelow7 жыл бұрын
Very good tutorial! I could hear it well and clear, on topic the entire time and well thought out.
@betogm5 жыл бұрын
Thank you so much, my friend. You have saved me a lot of headaches!
@john.morris5 жыл бұрын
Haha. IKR. No problem
@cdito82545 жыл бұрын
The best video on sorting arrays that I've found.. Thanks! I'm having difficulties applying this to the data I'm provided. I have a 2nd layer in my array. The sample data in the video is as follows: Array ( [0] => Array ( [name] => John [age] => 30 [website] => learnphp.co ) [1] => Array ( [name] => Joe [age] => 28 [website] => johnmorrisonline.com ) =SNIP======================================= and my dataset has a [rows] element: Array ( [rows] => Array ( [0] => Array ( [category1] => Membership [category2] => Camp FULL [category3] => [description] => [end_date] => 2019-08-15 =SNIP======================================= How can I modify the code to operate on the data which is one layer further into the dataset? I'll want to sort on the category 1, 2, 3, or end_date. Thanks!
@kabengwapatu45637 жыл бұрын
this works great ... issue is it doesnt work with dates... because it will only look at the first number in the date.
@marceloferreirafernandemar2178 жыл бұрын
Thank you, so much... This simple function help me a lot...
@john.morris8 жыл бұрын
No problem
@georgigeorgiev22199 жыл бұрын
Thank you very much! GOD bless you.
@john.morris11 жыл бұрын
No problem!
@amirul2649 жыл бұрын
You are awesome. Thanks.
@regissantos12198 жыл бұрын
Obrigado, very good!
@john.morris8 жыл бұрын
+Regis Santos thank you sir! :)
@gokulrathod707710 жыл бұрын
font size is very short...
@drallisimo348 жыл бұрын
great!!!
@john.morris8 жыл бұрын
+Dan Cacovean thanks!
@john.morris11 жыл бұрын
Haha thanks!
@JasiekH849 жыл бұрын
Pleas read more about array_multisort. This is the fragment of code that I write when I needed to sort multidemensional array:
@vyuutuube9 жыл бұрын
Jan Hryniuk copy pasting this in phpDesigner gives: syntax error, unexpected '['
@vyuutuube9 жыл бұрын
Jan Hryniuk 2x fname
@JasiekH849 жыл бұрын
V. Peters That is becouse I work at php 5.4. You probably have php version 5.3 or lower. If you want to use my code please change all arrays (in my case written like that ['key' =>'val']) into structure array('key' => 'val');
@vyuutuube9 жыл бұрын
Jan Hryniuk thanks for quick response. i tried that, but then it gives. unexpected T_DOUBLE _ARROW
@vyuutuube9 жыл бұрын
V. Peters by the way, i tried to sort on profession as well but that does not work? array_multisort($lname, SORT_DESC, $fname, SORT_ASC, $profession, SORT_ASC, $arr );