Question about printing newlines in text blocks (newbie)
Posted: Thu Aug 29, 2002 4:24 am
Hi, I'm just starting in PHP.
I do have a problem with printing large textblock from a MYSQL database.
The text block contains dumps from buildlogs and should look like:
Configure:
- AIPSPATH not set and no explicit path is given
for: DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD
Make all:
see configure.... could not compile packages DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD
Make check:
see configure..
(this one was viewed in MySQL-Front)
However when I use the following code (as adviced in the books I use):
echo "<strong><br>Test Summary: </strong>";
echo htmlspecialchars( stripslashes($row["Summary"]));
it looks like :
Test Summary: Configure: - AIPSPATH not set and no explicit path is given for: DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD Make all: see configure.... could not compile packages DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD Make check: see configure..
so it looks like the newlines aren't printed.
Is there a solution for this ( I really like to have the newlines. Because thsi part was rather small, usually I have 100's of lines in that block.)
Thanx in advance
I do have a problem with printing large textblock from a MYSQL database.
The text block contains dumps from buildlogs and should look like:
Configure:
- AIPSPATH not set and no explicit path is given
for: DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD
Make all:
see configure.... could not compile packages DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD
Make check:
see configure..
(this one was viewed in MySQL-Front)
However when I use the following code (as adviced in the books I use):
echo "<strong><br>Test Summary: </strong>";
echo htmlspecialchars( stripslashes($row["Summary"]));
it looks like :
Test Summary: Configure: - AIPSPATH not set and no explicit path is given for: DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD Make all: see configure.... could not compile packages DMI, StationSim, CEP/CPA/OCTOPUSSY, CEP/CPA/UVD Make check: see configure..
so it looks like the newlines aren't printed.
Is there a solution for this ( I really like to have the newlines. Because thsi part was rather small, usually I have 100's of lines in that block.)
Thanx in advance