[FX.php List] Line breaks in text fields

Andy Gaunt andy at fmpug.com
Mon Jul 10 10:24:35 MDT 2006


Chris,

Wrap your field that is displayed with the PHP function echo
nl2br($value['your field here'][0]);

This will change new lines to breaks

Andy Gaunt
T: 407.810.4722
andy at fmpug.com
http://www.fmpug.com    

Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award

For chapter locations, dates & times please visit the website at
http://www.fmpug.com If you can make it to a meeting, please RSVP at
http://www.fmpug.com/rsvp.php


-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Chris Bisgard
Sent: Monday, July 10, 2006 12:23 PM
To: fx.php_list at mail.iviking.org
Subject: [FX.php List] Line breaks in text fields

Hello all,

I'm working with a FileMaker 8 database that has some text fields with
line breaks in them. That is, when doing the data entry in FileMaker
Pro, some of my users are hitting "Enter" a couple of times to create
paragraphs that are separated by a blank line. But when I do a query and
display those fields with FX.php, the line breaks disappear and the text
runs together where there should be a space. Is there a way to detect
and parse these line breaks as "<br>" tags so that they will display as
intended? Alternately, is there a different way I can I train my data
entry people to enter the text so as to achieve the same effect?

Thanks for any help...

Chris Bisgard
IT Specialist
Regional Arts & Culture Council
Portland, OR
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list




More information about the FX.php_List mailing list