Answer the question
In order to leave comments, you need to log in
Algorithm of the most suitable option?
Which of the $arTwo options is the most suitable in all respects from $arOne?
<?
$arOne = [
'length ' => '100',
'width' => '200',
'height ' => '300',
];
$arTwo = [
'0' => [
'length ' => '110',
'width' => '240',
'height ' => '360'
],
'1' => [
'length ' => '90',
'width' => '160',
'height ' => '320'
],
'2' => [
'length ' => '140',
'width' => '210',
'height ' => '300'
],
];
?>
Answer the question
In order to leave comments, you need to log in
Depending on what you think is appropriate. If reading by volume, you just need to multiply the data of each $arTwo and $arOne object. Then get the modulo from subtracting each of $arTwo from $arOne. The smallest value obtained will probably be the most appropriate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question