how can i put variable in this code:
$time1 = new DateTime('17:30');
$time2 = new DateTime('18:00');
$timediff = $time1->diff($time2);
$hours=$timediff->format('%h');
$r=$hours*60;
$munits=$timediff->format('%i');
$m=$munits*1;
echo $bing_time=$m + $r;
I Want to put this var
$fetc_time=$row['start_time'];
from mysqli db to be
$time1 = new DateTime('$fetc_time');
$time2 = new DateTime('18:00');
$timediff = $time1->diff($time2);
$hours=$timediff->format('%h');
$r=$hours*60;
$munits=$timediff->format('%i');
$m=$munits*1;
echo $bing_time=$m + $r;
what is the correct method?