Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FileMaker output to PHP array

Featured Replies

I have a table with fields State, StateDataThisYear, and StateDataNextYear.  I want to end up with two html tables (one for this year and one for next) with the StateData in the table. The StateData is either the state name and a link to an anchor further down the page, or just the state name.  This table will be used as a Table of Contents for other data on the page.  The objective is to allow the page user to quickly see if there are events in a state and navigate to details if there are.

 

I think I want the data in a php array formatted like this:

 

Array
(
   [<<State>>] => Array
      (
         [0] => <<StateDataThisYear>>
         [1] => <<StateDataNextYear>>
      )
...
)

and then use a loop to put the StateData in its respective table.

 

I haven't been able to get the syntax right in the foreach loop of extracted records to obtain this array. Can someone help me with the php syntax, or suggest a better way?

Solved by webko

Go to solution
  • Solution

How does the array naturally return?

 

I'd probably just use two loops on the result set to build the two tables...

  • Author

Thanks, Tim.  That's what I ended up doing. I finally realized that I didn't need to use the combined data anywhere else, so the fancy-schmancy multidimensional array wasn't necessary.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.