$option_meno = ["Lukas", "Ivka"];
$sql = "SELECT *
FROM uctovnictvo
WHERE meno IN ('$option_meno[1]', '$option_meno[0]')
AND datum BETWEEN '$date_start' AND '$date_end'
ORDER BY $order ";
For sure there has to be a better way how to select user based on name (meno
). There can be more or fewer names in the $option_meno
array.
I would like to make especially this more simple than listing out each index in the option array ('$option_meno[1]','$option_meno[0]')
.