php number int from string code example
Example 1: get numbers from string php
phpCopy<?php
$string = 'Sarah has 4 dolls and 6 bunnies.';
preg_match_all('!\d+!', $string, $matches);
print_r($matches);
?>
Example 2: Convert an Integer Into a String in PHP
phpCopy"First string".$variablename."Second string"