I had a series of data (class\_time) store in php. And I wish to compare the day and time to prevent time collison when supervisor create the class. So I use the `list()` & `split()` functions to separate my data. The format of data is 

> 
> Fri, 11:00-13:00
> 
> 
> 

And this is the code that I use to trace it.

```
while($row8=mysqli_fetch_assoc($result8){
    $preclasstime=$row8['class_time'];
    list($day, $starthrs,$startmin,$endhrs,$endmin) = split('[,:-:]', $preclasstime);

    if($day==$_POST['csday']){
        $numstarthrs=(int)$starthrs;
        $numstartmin=(int)$startmin;
        $tottimestart=($numstarthrs*100)+($numstartmin);

        $numendhrs=(int)$endhrs;
        $numendmin=(int)$endmin;
        $tottimeend=($numendhrs*100)+($numendmin);

        echo "$numendmin \n";
    }

```

However, after I execute it, it can obtain the `$day`, `$starthrs`, `$startmin` successfully, but when turn into `$endhrs`, `$endmin`, it cannot function well. It will skip one of the `$endhrs` and directly to the `$endmin`.

For example: 

> 
> $tottimestart=1100 but $tottimeend=0000, it will ignore the 13.  
> 
>  The answer should be 1300.  
> 
>  If another example such as: Fri, 11:00-13:30 , $tottimeend should be equal to 1330.
> 
> 
> 

I don't know where the error which to cause it to skip one of my value.