Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $s = "#22aantal283xuitvoeren";
- preg_match_all("/d+/", $s, $number);
- echo end($number[0]); // 283
- $string = "#22aantal283xuitvoeren";
- $result = preg_match_all(
- "/(d+)/",
- $string,
- $matches);
- $lastNumericValueInString = array_pop($matches[1]);
- echo $lastNumericValueInString;
Add Comment
Please, Sign In to add comment