Web Analytics Made Easy -
StatCounter retaining text formats - CodingForum

Announcement

Collapse
No announcement yet.

retaining text formats

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • retaining text formats

    I have the following field "Proyecto" in my database table:

    `proyecto` text NOT NULL,

    I have entered the following data into the "proyecto" field of ONE record:

    - Taxonomيa, Sistemلtica, Faunيstica y Autoecologيa de Moluscos de agua dulce.

    - Direcciَn y coordinaciَn del Proyecto Fauna Ibérica

    - Coordinaciَn del Consejo Editorial de la serie Fauna Ibérica.

    When I SELECT it to view it, the text is all run together. In other words it does not retain the line breaks between the three sentences.

    How can I get it to retain the formatting and not run together.

    this is the php line I am using after I run the query:

    <?php echo $row_test['proyecto']; ?>

    Can it be done?

    thanks alot

  • #2
    You may have mixed up things a little. If you insert text like you did into a MySQL database, all text input is preserved, every space and every line break you send into. So the fault is not on SQL's side, but rather in your browser (or whatever your viewing device is). Line-breaks, tabs and multiple spaces do not show in a HTML page. You need to mark up that area with a special tag:

    <xmp>
    <?php echo $row_test['proyecto']; ?>
    </xmp>

    This should give you the text as you entered it...
    De gustibus non est disputandum.

    Comment

    Working...
    X