On Mon, May 20, 2002 at 01:26:20PM -0600, Jas wrote:

> $types = array(".gif"=>"1",
... snip ...
> if ($img1_name != "" && eregi('$types', $img1_name)) {

A few things FYI:

* eregi() takes a string as the pattern, not an array.

* you put $types in single quotes, which doesn't get evaluated...
  double quotes are needed for evaluation... but you don't need to
  put a single variable in quotes anyway.

* If you want, you can implode the types array into a string which you
then use as the pattern.  BUT, in your array() statement, you're putting
the extension name into the key, rather than the value section, so this 
wouldn't work unless you change that.


               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution
    sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409

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

Reply via email to