Hi Experts, I'm trying to replace a tick mark in a variable with a "star" before sending it to my MySQL table (if I leave the tick mark in, MySQL assumes the field to close). When I use preg_replace, I get the following error:
Warning: preg_replace() [function.preg-replace]: No ending delimiter ''' found in /Library/WebServer/Documents/TransferRawData.php on line 144
The table does update, but the field that is to be updated with the variable is blank (all other fields update properly).
Here is the PHP command I use to replace the tick mark with a star:
$Misc4Desc = preg_replace("'","*",$Misc4Desc);
Any help will be greatly appreciated!