I have a variable code block used for calling content into my tables (I swear one day I'll get around to laying things out only using css). This variable code specifies that the extension called is a .php file. IE, main.php which is text is called into a table on index.php and inherits the css of index.php.
I want to add .jpg to the list of acceptable extensions.
The code currently reads:
Code:
$ext = ".php";
$id = "".$id."".$ext."";
if (file_exists($id))
{
include($id);
} else {
include("main.php");
}
I meagerly patched that together 2 years ago using a book as a guide. How would I add .jpg to the first line?
Is the correct syntax:
Code:
$ext = ".php",".jpg";