Jump to content
Larry Ullman's Book Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


detlevski last won the day on December 7 2016

detlevski had the most liked content!

detlevski's Achievements


Newbie (1/14)



  1. Hi Larry, thanks for your reply, that makes sense and playin g with the file made it already clear. By the way, the book is great for grasping the basics of OOP.
  2. Change the sorting algorithm based on the desired sort order: if ($this->_order == 'ascending') { uasort($list, array($this, ➝ 'ascSort')); } else { uasort($list, array($this, ➝ 'descSort')); } The second argument to the uasort() function should be the name of the function to use for the comparison. Because that function—ascSort() or descSort()—is defined as a method in this current object, you can use this construct to reference it: array($this, 'methodName'). In chapter 7 I don't get the construct above here in BOLD, did I miss something ? Why not use uasort($list, 'ascSort');
  • Create New...