Answer the question
In order to leave comments, you need to log in
" sign in the string PHP?" />
How to print a number from a string if there is a ">" sign in the string PHP?
Good afternoon. There is the following code:
$str_test = ">100";
if (preg_match('/(>)?(\d+)/i', $str_test, $matches)) {
print_r($matches[0]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question