Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

image_exists

This function will find the next available image name based on the $image given inside the $dir.

image_exists

Quote

image_exists ( string $dir , string $image )


Parameters
dir
The directory to check for the image, remember a / at the end of the directory path.

image
The image inside the directory you want to check for.

Return Values
This function will return the next available image name.

Example
Code
<?php
/* Content in IMAGES dir
 image.jpg
 image_1.jpg
 image_2.jpg */
 
require_once INCLUDES."photo_functions_include.php";
 
$dir = IMAGES;
$image = "image.jpg";
 
echo image_exists($dir, $image);
?>


Output from example

Quote

image_3.jpg


Notes
You need to include the INCLUDES."photo_functions_include.php"; file for this function.