Page 1 of 1

Help with breaks

Posted: Tue Aug 20, 2002 12:48 pm
by pbsperry
I've got a slight problem (code is listed below). Some of the fields in the database have spaces in them ("monte carlo," for example). The problem is that the space in between the two (or three or four) words in the field is being interpreted as a carriage return, so that the results in the table for this field look like:

MONTE
CARLO

Any suggestions on how to modify the code so that it ignores the space and puts them on the same line (such as MONTE CARLO)?

I've tested it and it's not a table width issue, as "P A S" is displayed as:

P
A
S

Consequently, it takes up 3 lines verses one.

Code: Select all

<snip>
$model = htmlspecialchars(stripslashes($row&#1111;'Model']));
echo '<td width="60" valign="top">'.$model.'</td>'; 
<snip>

Posted: Tue Aug 20, 2002 1:26 pm
by phpPete
So if you look in the MySQL table via the command line you see?

SELECT * FROM city

City

MONTE
CARLO
----------
Pittsburgh
------------
San
Francisco