what's wrong with this ?
| From: | Vadee Prudon | Date: | Wed, 09 Aug 2000 07:13:29 +0000 |
| Subject: | what's wrong with this ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10857@lists.php.net to get a copy of this message | ||
Hai,
Can somebody help me with my problem.
I'm inserting my data trough an *.tab file which uses as an enter.
when i'm displaying my news item he will not show an <BR> but .
How can I replace the into <BR> or newline.
I tried several ways, but nothing seems to work ;
fd = fopen ("news.tab","r");
while (!feof($fd)) {
$buffer = fgets($fd, 4096);
if(preg_match("/(\d+)\t([^\t]*)\t([^\t]*)\t([^\t]*)/i", $buffer, $parts)){
echo "sample: $parts[1]";
$parts[1] = ADDSlashes(nl2br(HTMLentities($parts[1])));
and then my query.
Also tried
$parts[1] = str_replace("", "<BR>", $parts[1]);
or
$parts[1] = str_replace("", "\n", $parts[1]);
and
$parts[1] = htmlspecialchars($parts[1]);
$parts[1] = addslashes($parts[1]);
$parts[1] = ereg_replace("", "\n", $parts[1]);
nl2br($parts[1]);
Greetings, Vadee