Jump to content

[SOLVED] Regexp doubt: preg_match('/.+\.(jpeg|jpg|gif)/', $photo)


tivrfoa

Recommended Posts

  Quote

Returns true for me...  Can you show us more code?

thanks Maq and sorry!

the regexp is (almost) correct, I forgot the "!". shame :/

 

if($photo == null || !preg_match('/.+\.(jpeg|jpg|gif)$/', $photo)) {

 

now it's correct :)

 

thank you again!!!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.