I'd use usort
, which takes a callback so you can define any comparison behaviour you like.
In your case, something like:
usort($value1, function($a, $b) {
return $a['value_a'] * 1.5 + $a['value_b'] - $b['value_a'] * 1.5 - $b['value_b'];
});
http://www.php.net/manual/en/function.usort.php
Update: There is a note on the above manual page that the result of the callback will be rounded to an integer, therefore you might want to consider your own rounding within the callback (e.g. if the amounts are dollars you could multiply everything by 100 to get an integer value)