String supprime les deux derniers caractères PHP
echo substr($string, 0, -2);
Akash
echo substr($string, 0, -2);
$start_time = '1030';
$pattern = '/(?<=\d\d)30/';
$start_time = preg_replace($pattern, '50', $start_time);
//result: 1050