I'm fairly new to PHP, and I'm setting up a "members area" for my site following this tutorial. There seems to be a problem with the code near the bottom of the page.
When trying to pick out the invalid characters from a username field, the array $junk is set up.
$junk = array('.' , ',' , '/' , '\' , '`' , ';' , '[' , ']' , '-', '_', '*', '&', '^',
'%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '=');
This block of code returns a syntax error for me.
Now, my first thought was that either the '#' or the '(' and ')' was causing the problem, since they are commonly used in html and php. The error was still returned with them removed.
I am new to php, so it very well could be just some small syntax error I am missing. Any input would be great. Thanks!
EDIT: Also, if there is an easier way of doing this, please let me know!