i have this script it wont display the page if i have over like 30 things in an array. wtf but it will display if theres only like 20. does anyone know what i can use instead of array() because i have like 100 things i need to use in an array
heres the code im working on to make sure that people cant register on my site with prohibited words in their usernames they pick:
$lowercaseusername = $username;
$lowercaseusername = preg_replace("/[^a-z]/i", "", $lowercaseusername);
$lowercaseusername = strtolower($lowercaseusername);
$banned = ("this", "times", "like", "100");
$trimthex = trim($lowercaseusername, "x");
var_dump($trimthex);
function stristr_array( $trimthex, $banned ) {
foreach ($banned as $singleword ) {
if (strstr($trimthex, $singleword) != FALSE){
exit("cannot have $singleword in your usernname!");}}
}