M
M
Marcel Sultanov2020-05-16 10:59:54
PHP
Marcel Sultanov, 2020-05-16 10:59:54

How to check a number for the possible presence of letters?

How can I check the number, let's say 1234 for the presence of letters, if 1234 then true, if 12F4 then fall. Tell me please...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanatPHP, 2020-05-16
@FanatPHP

Write the title of your question in the address bar of your browser and press Enter

I
Ivan Ivanov, 2020-05-16
@maksim_fix

function a($str) {
 if(is_numeric($str)) {
  return true;
 }
 return false;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question