[FX.php List] Exploding the carriage returns within a Filemaker field

Dale Bengston dbengston at preservationstudio.com
Sat Nov 25 23:08:40 MST 2006


It works because PHP knows how to parse the return characters  
regardless of originating platform. After years of doing work in PHP,  
I could still spend a month poring over the built-in string functions:
	http://us3.php.net/manual/en/ref.strings.php

...and two months with the array functions:
	http://us3.php.net/manual/en/ref.array.php

Dale

On Nov 25, 2006, at 3:02 PM, Gary Sprung wrote:

> Dale Bengston at dbengston at preservationstudio.com wrote:
>
>> I think what you're running into is the inconsistent encoding of
>> carriage returns across platforms. To expand on Gjermund's idea, you
>> could use nl2br() to replace your carriage returns with <br />
>> (generally for display of data with returns in a browser page) and
>> then use explode() to explode the elements by <br />.
>
> That worked, but why? According to php.net, it works on the "new line"
> character, which I believe is ASCII 10. Filemaker says that any  
> returns
> within a text field are ASCII 11.
>
> Anyway, nl2br() worked so well that I didn't need the array and  
> foreach().
> The function alone did the trick for my purpose.
>
> Thanks!
>
> Gary
>
> --------
> Gary Sprung
> GNURPS Consulting
>
> gary at gnurps.com
> www.gnurps.com
>
> Landline: 720-565-9933
> Cell: 303-859-9331
>
>
> _______________________________________________
> 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