Jump to content

[SOLVED] Easy Question


Schlo_50

Recommended Posts

Hello guys,

 

I have a bit of a noobie question to ask. For the code below, how in my if statement would I try to see if $fext matches $jpg or $jpeg? At the moment it only checks to see if $fext equals $jpg.

 

$fn = $aname;
$fext = substr($aname, strrpos($aname, '.'));
$jpg = ".jpg";
$jpeg = ".jpeg";

if ($fext == $jpg) {

print "foo";

}

 

Thanks guys!

Link to comment
https://forums.phpfreaks.com/topic/105574-solved-easy-question/
Share on other sites

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.