Hello, 1 more quick question. Im saving an XML file on my server...it now removes white space and non file name chars. If the file name already exists, it is overwriting. How can i have it increment, if exists.. E.g. Saving: MyFileName On Server Already MyFileName Saves It As MyFileName1 Thanks! -Tim
$file = 'somename'; $int = 1; $tmp = $file; while (file_exists($tmp . '.xml')) { $tmp = $file . $int; $int++; } $final_name = $tmp; PHP: