[FX.php List] Line breaks in text fields
Chris Bisgard
cbisgard at racc.org
Wed Jul 12 09:25:03 MDT 2006
Thanks to Andy, Derick and Kevin -- these are all very helpful
solutions. Being relatively new to both PHP and FM8, I'm learning as I
go.
I'm now using the PHP 'nl2br' function (which I hadn't known about) as a
quick fix, and it's working quite well for my current project. However,
I'm very interested in checking out the other ideas for future
applications, particularly Kevin's nifty 'str_replace' function.
Thanks again!
Chris
> ------------------------------
>
> Message: 2
> Date: Mon, 10 Jul 2006 12:24:35 -0400
> From: "Andy Gaunt" <andy at fmpug.com>
> Subject: RE: [FX.php List] Line breaks in text fields
> To: "'FX.php Discussion List'" <fx.php_list at mail.iviking.org>
> Message-ID: <007101c6a43d$5685d6d0$0202a8c0 at SHUTTLE>
> Content-Type: text/plain; charset="us-ascii"
>
> 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
More information about the FX.php_List
mailing list