tags:

views:

7

answers:

1

Hi,

I have this:

SediI18n:
   XXXXXX:   { id: sede_foo_1, culture: it, paese_indirizzo: it,
ufficio: "Ufficio di XXX 1", indirizzo: "Foo Bar FooBar" }

Now, when i prints this register the field "indirizzo":

Foo Bar FooBar

Everything is in one line.

Any way to write the value of "indirizzo" to print directly in my web page something like this below?

Foo
Bar
FooBar

Javi

A: 

You could try embedding \n in your string, and see whether they make it into the database. You could also try block literals by starting the string with a | character, which allows you to span multiple lines, but that might break the generated insert clause.

Then, to convert your newlines to <br/> tags, use nl2br() when you display the string, otherwise the linebreaks in the HTML source will just be ignored.

Jan Fabry