Jump to content

[SOLVED] Stripping Double Quotation Remarks from a Variable


ArizonaJohn

Recommended Posts

Hello,

 

The code below does a great job removing single quotation marks, periods, and slashes from the variable $find.  However, I would like to remove double quotation remarks as well, but if I add """ to the $illegal array, it ruins all of my PHP code.  So how can I add double quotation marks to the $illegal array?

 

Thanks in advance,

 

John

 

<?php
$illegal = array("'", ".", "/");
$find = str_replace($illegal, '', $find);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.