How do I check to see if a space is contained in a string?
$string = 'this string has spaces in it'; if (strpos($string, ' ') !== false) {echo 'yes there is a space';} else {echo 'no there are no spaces';}