phpArrayValue ( array ; key ; pos )
This will get the key and value from a php array.
Average rating: 4.7 (25 votes) Log in to vote
Dignan Consulting Inc
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This return the key and value of a php array.
array = php array (example of a php array:
[cc_type] => Visa
[cc_owner] => todd dignan
key = the key in the array or the name of the value.
pos = always equals 0
You will need to also use the custom function "SuperTrim" http://www.briandunning.com/cf/904
I also use this to get just the value.
text = phpArrayValue ( $array_list ; "[cc_owner]" ; 0 );
start = Position ( text ; "=>" ; 1 ; 1 )+3;
number = Length(text);
result = Middle ( text ; start ; number )
If(result = "";""; result)
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.