<?php $strings = [ "In My Cart : 11 items", "12 Monkeys", "11 won 1 too", "At the end 7", ]; foreach ($strings as $string) { var_dump(sscanf(' ' . $string, '%*[^0-9]%d')[0]); }
You have javascript disabled. You will not be able to edit any code.