This has me pulling my hair out as I don't see anything wrong. It is working for the other characters/spaces except that the apostrophe is not being replaced:
I tried the str_replace() function both as individual lines and as the array above, I tried escaping the character and I tried the chr(39) code. Does someone have better eyes to see why it won't work? There are no error messages yet the apostrophe remains.
Don
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases
Code:
$Characters = array(" ", chr(39), "'", " ");
$StringReplace = array(" ", "", "", "_");
$DocName = str_replace($Characters, $StringReplace, $DocName);
I tried the str_replace() function both as individual lines and as the array above, I tried escaping the character and I tried the chr(39) code. Does someone have better eyes to see why it won't work? There are no error messages yet the apostrophe remains.
Don
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases