You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
I've scoured trying to find an example to pull a selected field from an array. I can pull fields based on key name just fine, however having an issue determining how to utilize CFP to pull a value from an array, using PHP.
Any assistance would be greatly appreciated. I've greatly appreciated the library having been made available thus far, thanks guys!
The text was updated successfully, but these errors were encountered:
I had an array of Entries, and then within each entry a set of definitions, along with another array. It wasn't pretty, and there are likely better ways to go about it, but this was my method of resolution:
As the API stands today, there is not a more efficient approach than the one you chose. In terms of working with $plist that is. One could probably optimize the looping (unless you really want the very last $finalvalue of the very last $entry).
That said, it would be possible to implement an xPath / CSS-selector like approach to navigate within a $plist. Something that would convert your above looping thing into $versionalias = $plist->find('versions:last/versionAliases:last')->getValue();
I've scoured trying to find an example to pull a selected field from an array. I can pull fields based on key name just fine, however having an issue determining how to utilize CFP to pull a value from an array, using PHP.
Any assistance would be greatly appreciated. I've greatly appreciated the library having been made available thus far, thanks guys!
The text was updated successfully, but these errors were encountered: