Menu
I want to check that a value passed to my script ONLY contains a to z, 0 to 9 or _. That means no spaces.
This seems to work but I am new to this so want to check.
$string = ‘hello hello’;
ereg(‘^[a-z0-9_]+[a-z0-9
returns false.
When I had this
ereg(‘^[a-z0-9_]+$’, $string, $array);
It was happy and returned the string in array[0].
Confused.