Re: Problem with special characters
| From: | Steve Brett | Date: | Fri, 09 Nov 2001 10:07:07 +0000 |
| Subject: | Re: Problem with special characters | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14176@lists.php.net to get a copy of this message | ||
There is a solution posted on the original thread.
PHP already has functions to deal with this problem.
str_replace is a waste of time.
Steve
"Natalie Leotta" <LeottaN@ims.nci.nih.gov> wrote in message
news:7546CB15C0A1D311BF0D0004AC4C4B0C02070F76@exchng.ssims.nci.nih.gov...
> I would recommend that you try something like str_replace and replace all
of
> the double quotes with nothing. You'll probably need to put a slash in
> front of the quote in there, but I think it should work.
>
> Good luck!
>
> -Natalie
>
> > -----Original Message-----
> > From: Don [SMTP:don@lclcan.com]
> > Sent: Thursday, November 08, 2001 11:14 AM
> > To: php-db list
> > Subject: [PHP-DB] Problem with special characters
> >
> > Hi,
> >
> > I have a mysql database that contains various data. I am using PHP to
> > pull out the data and display it within a HTML form. I am having
trouble
> > with certain data that contains escaped characters.
> >
> > Example: field contains --> mr "John Smith"
> >
> > My PHP code is:
> > echo "<td width=\"50%\"><input type=\"text\"
> > name=\"name" . $rownum .
"\"
> > size=\"46\" value=\"" . $queryRow[name] .
> > "\"></td>";
> >
> > The result displayed is --> mr
> >
> > What happened to "John Smith" ???
> >
> > I have tried the functions stripslashes and addslashes but still no
luck.
> >
> > Can anyone help?
> >
> > Thanks,
> > Don