[FX.php List] Exploding the carriage returns within a Filemaker
field
Gary Sprung
gary at gnurps.com
Fri Nov 24 10:25:32 MST 2006
Howdy,
I am trying to use the explode() function to get the return-separated values
within a Filemaker field into an array. I¹ll then do a foreach() on the
array to display the values. I seem to be unable to get the delimiter
character correct. The syntax explode("\r",$fieldcontents) does not work,
yielding an array of only one element with all the values and their return
characters. "\r\n" and "\n\r" are no better. Can anyone suggest what's going
wrong here?
Code:
$FMvariable = $Data['FMfieldName'][0];
$FMarray = explode("\r",$FMvariable);
echo '<pre>';
echo print_r($FMarray);
echo '</pre>';
Result:
Array
(
[0] => Board Volunteer Recruitment
staff recruitment
accessibility
other
)
1
In the above, what I want is for "Board Volunteer Recruitment" to be one
element, "staff recruitment" to be another element, "accessibility" a third,
and "other" a fourth.
Thanks,
Gary
--------
Gary Sprung
GNURPS Consulting
gary at gnurps.com
www.gnurps.com
Landline: 720-565-9933
Cell: 303-859-9331
More information about the FX.php_List
mailing list