<?php $string = "1XYZ"; $int = 1; $start_int = (int) $string; $start_str = str_replace($start_int, "", $string); $result = $int+$start_int . $start_str; echo $result;
You have javascript disabled. You will not be able to edit any code.