The variable $time can be the next time ( 0:12 , 01:22 , etc.). When splitting a string, I get $time[0]==0 or 01 . Am I checking for the presence of a single digit in this variable?
$time=explode(":",$value); print_r($time); if($time[0]<=10 and strlen($time[0])==1){ $minutes="0".$time[0]; }else{ $minutes=$time[0]; }