1 and 2 would presumably be input from the web page. The rest would be something like:
for ($m=1; $m<=$M; $m++) {
for ($l=1; $l<=$L; $l++) {
for ($j=1; $j<=$N; $j++) {
#do calculation here storing it in a 2D array
}
# select minimum here (perhaps min() function)
}
}
# use array sort
# use PHP vector class
# compute distance from vectors
# echo results in desired format
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.