How to extract only numeric value from "xyz123" string then add 5 in first numeric i.e. 1 and then print xyz623 in final output.
if(isset($login)){
    $length = strlen($pass);
    $c = false;
    for($i=0; $i<$length; $i++){
        if(preg_match('/^[0-9]$/',$pass[$i]) && $c==false){
            $a = (int)$pass[$i];
            $b = $a + 5;
            echo "<br>".$b."<br>";
            $c = true;
        }
    }
}
 
     
    