Tag Archives: function

How to sort a multidimensional array based on key?

snippets

How to sort a multidimensional array based on key? First of all, let’s give credit to the person who wrote this function. The problem ? Let’s say you have a multidimensional array and you want to sort based on a key that is not on the first level of the array, how would you do

How to invoke dynamically a class method in PHP?

snippets

How to invoke dynamically a class method in PHP? Today will talk about calling a method from inside class, however you are in the situation of calling a method dynamically in a loop, for each element of an array. To do this we will make use of a php function called call_user_func.Using this function, you

Request an article ←