HCProfessionals Posted October 3, 2011 Share Posted October 3, 2011 I need to sort this: customVar($var1, $var2, $var3); I have tried: sort(customVar($var1, $var2, $var3)); Link to comment https://forums.phpfreaks.com/topic/248350-function-sorting/ Share on other sites More sharing options...
AbraCadaver Posted October 3, 2011 Share Posted October 3, 2011 sort() sorts an array. What are you trying to do? Link to comment https://forums.phpfreaks.com/topic/248350-function-sorting/#findComment-1275342 Share on other sites More sharing options...
Psycho Posted October 3, 2011 Share Posted October 3, 2011 What do the variables $var1, $var2, and $var3 contain and what do you expect the output to be? Link to comment https://forums.phpfreaks.com/topic/248350-function-sorting/#findComment-1275347 Share on other sites More sharing options...
AbraCadaver Posted October 3, 2011 Share Posted October 3, 2011 Also, if you're trying to sort the result of a function that is an array you will need to assign the return to a variable and then sort it. Sort takes a reference and operates on the array "in place". Link to comment https://forums.phpfreaks.com/topic/248350-function-sorting/#findComment-1275350 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.