Jump to content

Using if() with a file


Logician

Recommended Posts

What I am trying to do is use:

 

if (is_file(./products/$row['gender']/blue.png)) {echo "blue.png";}

 

$row['gender'] is causing a problem. I have tried:

 

{$row['gender']}

{.$row['gender'].}

.$row['gender'].

 

but they didn't work. drat! Do you know whats wrong?

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.