function valid_chars($file_name)
{

for($i = 0; $i < strlen($file_name); $i++)
{
  if (!in_array($file_name[$i], array('q','w','e','r','t','y','u','i','o','p','l','k','j','h',
'g','f','d','s','a','z','x','c','v','b','n','m','Q','W',
'E','R','T','Y','U','I','O','P','L','K','J','H','G','F',
'D','S','A','Z','X','C','V','B','N','M','0','1','2','3',
'4','5','6','7','8','9', '.', '_')))
{
 return false;
}
else
{
 return true;
  }
}

Found this snippet of code on php.net (http://www.php.net/manual/sk/ref.strings.php), but it just reurns a parse error.


OS: OS X 10.2
PHP: PHP 4.2.3
MYSQL: 3.23.51

// magnus n.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to