4 Replies Latest reply on May 29, 2014 10:21 AM by mattman

    PHP Array to FileMaker Let variables

    mattman

      Ok, so, before you say "Why don't you do it this way..." Here's the objective.

       

      Walk a PHP array and determine if the node is a value or array. If it's an array then you want to push it onto a new line - and do this recursively.

       

      Now, when I say "new line" I actually mean the FileMaker paragraph character. As the title indicates, my goal is to make a PHP function (or functions) to create a compacted FileMaker list of variables which can be looped through and evaluted.

       

      I have a very comprehensive chunk of code at the following link and it does it's best to explain what the desired output is.

       

      https://gist.github.com/petrowsky/e30130675e50cd8c066d

       

      Essentially, I'd like to compact a multidimensional array into FileMaker's Let format and walk the list of variables by exploding out container variables as needed.

       

      You can determine if the current variable is a container of multiple variables by using a PatternCount against ¶

       

      Man, I wish FileMaker had multidimensional arrays with mapping functions!

       

      As of this posting, I'm stuck on creating a PHP function which is a mirror for FileMaker's Quote() function.

       

      Any takers for helping out? The code is public.