Categories
How to wrap numbers in regular expression tag in php?
Greetings. There is a date output in php in the following format: September 23 Task, wrap numbers in How to highlight numbers clearly, but how to wrap them in a tag?
Answer the question
In order to leave comments, you need to log in
$str = '23 сентября'; $result = preg_replace('/([0-9]+)/', '<strong>$1</strong>', $str);
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question