string - Replace first and last digit with * in php -
i want replace 1st , last digit of number series *. such have
$number = 123435987345735372;
i want such
*535738753957353*
like this?
$number = 123435987345735372; $new_number = substr($number, 1, -1); $new_number = "*".$new_number."*"; echo"original number: $number<br>new number: $new_number";
like norbert van nobelen said, check out manual @ php.net
Comments
Post a Comment