It is too specific of a condition for there to be a native way.
On other hand this is hardly complicated as simply sorting an array in PHP. You can use usort()
with a small custom callback, containing your comparison logic.
It is too specific of a condition for there to be a native way.
On other hand this is hardly complicated as simply sorting an array in PHP. You can use usort()
with a small custom callback, containing your comparison logic.