faqts : Computers : Programming : Languages : PHP : kms : Functions

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 9 people (44%) answered Yes
Recently 4 of 9 people (44%) answered Yes

Entry

How can I use count_chars() to know if a variable contain spaces? e.g. a username

Apr 4th, 2002 03:10
Ayse Geertsma, Christian Sueiras, Ben Udall,


Try this:
$counter=count_chars($username);
if ($counter[ord(' ')]>0) header('location:registeruser.php');