How to create a list of allowed characters
Posted: Wed Jan 18, 2012 9:13 pm
Hi, i'm a noob to PHP and this is a noob question 
Im trying to create a list of allowed characters so I can compare them with a string to return true or false
I know this is done wrongly, but how exactly would I do it? Would I use an array? Please help
Im trying to create a list of allowed characters so I can compare them with a string to return true or false
I know this is done wrongly, but how exactly would I do it? Would I use an array? Please help
Code: Select all
$test = ( "A", "B", "C", "D", "E", "F", "G", "H", "I","J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X","Y", "Z", "0-9" );