use the following code
$vals=explode("'", "'abc'");
$your_value=$vals[0]; //I am little confused, if it is not working try 
index1

Elan wrote:

> Hi,
> 
> 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?
> 
> (In case you'r wondering: I created the quoted string to store it in
> MySQL, now I want to display the same string in a Webpage. Usually the
> strings I display do not have embedded single quotes, and I add the
> single quotes when I output the string printf("<input type='text'
> value='%s'>", $value); That works well enough for strings that don't
> already have embedded quotes. But when they do I want to get rid of them
> quickly and easily, otherwise I get ...value = ''some value''> and
> Netscape doesn't display the value embedded in two single quote
> characters).
> 
> TIA,
> 
> Elan
> 


-- 
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]

Reply via email to