Skip to content
Advertisement

how to use explode for an array of objects

I have an array like that:

JavaScript

I want to do a foreach in “prerequis”:

JavaScript

I need in second foreach to use in $value2['champ'] where $value2['champ'] is “tranche.fus.fup_id. So I need to explode that to have ['tranche']['fus']['fup_id']. How to use explode with that ? thanks everyone 🙂

Advertisement

Answer

you can use laravel data_get helper:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement