In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Elan)
wrote:
> I have a string, "'abc'". How do I convert it to "abc" (i.e. how do I
> strip the embedded single quotes) with a minimum of overhead?
If there's no chance that the string could also contain legit single-quotes
(such as as an apoostrophe), you can simply use str_replace().
Otherwise, either str_replace() with strpos() -- to search/replace only on
2nd char and 2nd-to-last character -- or good ol' preg_replace() by itself.
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]