Re: <br> appear in Text file
| From: | Andrey Hristov | Date: | Mon, 27 Aug 2001 09:31:29 +0000 |
| Subject: | Re: <br> appear in Text file | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-11851@lists.php.net to get a copy of this message | ||
See:
1)strip_tags
2)fgetss
3)preg_replace('|(<.*?>)(.*?)(</.*?>)|','\2',$string);
Example:
<?php
$string="<a href=''>alabala</a>";
$string=preg_replace('|(<.*?>)(.*?)(</.*?>)|','\2',$string);
echo htmlspecialchars($string);
?>
Produces :
alabala
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
----- Original Message -----
From: "Jack" <jack@nedcor.com>
To: <php-db@lists.php.net>; <php-general@lists.php.net>;
<php-windows@lists.php.net>
Sent: Monday, August 27, 2001 11:21 AM
Subject: [PHP-DB] <br> appear in Text file
> Dear all
> I'm writing a script which will greb the data from a user input form into a
> text file (txt file), but the problem is that when the data had passed to
> the txt file, there will be some thing like the <br> and black square appear
> inside the file. This is affecting to display the data from that txt file to
> the text box in (input box).
> Is there anyway that i can do to avoid grebing the <br> from txt file to my
> input box's value? or anyway that i can delete the <br> when the data is
> greb from input box to txt file??
>
> Thanks a lot
>
> Jack
> jack@nedcor.com
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>