<?php preg_match('^.*(\d+).*$', 'Осталось всего 2', $roomsLeftMatches); $left = isset($roomsLeftMatches[1]) ? $roomsLeftMatches[1] : null; var_dump($left);
You have javascript disabled. You will not be able to edit any code.