Answers for "how to detect if name has an space php"

PHP
0

if name value contains space in php

if ($str == trim($str) && strpos($str, ' ') !== false) {
    echo 'has spaces, but not at beginning or end';
}
Posted by: Guest on March-07-2021

Code answers related to "how to detect if name has an space php"

Browse Popular Code Answers by Language