php: i want to trim "h;" from "w;h;" to get ''w;' but what I got is "w" : The below program is to right trim the string "w;h;" off string "h;" to get "w;". But unexpectedly what I got is "w", not "w;".  



 <?php
    
        $string="w;h;";
        $str="h;";
        $nStr=rtrim($string,$str);
        echo $nStr.'</br>';
    
 ?>
   