I’m building my first snippet but I’m blocked with a PHP problem.
I have several classical variables (2 for each weekday) :
$place_monday_midday = "11";
$place_monday_evening = "11";
$place_tuesday_midday = "12";
$place_tuesday_evening = "15";
$place_wednesday_midday = "19";
$place_wednesday_evening = "11";
...
But I also have several “if” to check the current week day ($current_day) and if we are the midday or the evening ($when)
After all this tests on dates and times, I get this :
$where = '$place_'.$current_day."_".$when;
If I do echo $where;
I get $place_monday_evening
which is correct.
My question is : how to get the value (11 in this example) as return for my snippet ?