This topic is locked

Array problem

8/12/2010 11:02:30 AM
PHPRunner General questions
scuba author

Hi everyone,

how can I force a linebreak within "text" => ...



array(

"slidelink" => "http://www.ges-electronic.de/steckverbinder/einpolig_hv.php"'>http://www.ges-electronic.de/steckverbinder/einpolig_hv.php";,

"title" => "my title",

"category" => "my category",

"tagline" => "my tagline",

"text" => "my text_1 my text_2 my text_3",

"slideimage" => "my slideimage"

)


... to make it look somehow like this?



array(

"slidelink" => "http://www.ges-electronic.de/steckverbinder/einpolig_hv.php"'>http://www.ges-electronic.de/steckverbinder/einpolig_hv.php";,

"title" => "my title",

"category" => "my category",

"tagline" => "my tagline",

"text" => "- my text_1

- my text_2

- my text_3",

"slideimage" => "my slideimage"

)


thanks for your help in advance!!!!!

A
ann 8/13/2010

Hi,
try the following code:

...

"text" => "my text_1 \n my text_2 \n my text_3",

...
scuba author 8/17/2010

Thanks for helping Ann!
Your suggested code is exactly what I have tried before, but it just doesn't work - it ends up being echoed as a line. Any other ideas?
thanks!

A
ann 8/17/2010

Hi,
try this line then:

"text" => "my text_1 \r\n my text_2 \r\n my text_3",