Skip to content

String Splitting PHP

I am wanting to break down a string in to different parts and because of the nature of the string I cant quite get my head around how I could go about doing this or if its possible. Below is the string that I am trying to break up: I would like it like: I was thinking of dooing something

Recursively getting a list of parents for each node in a nested PHP array

In PHP I have a set of nested arrays of data. I want to flatten these, so that for every node and leaf I get a list of its parents. Here’s an example of the original array – note, each part could be of an unknown depth and length: (The data I’m actually parsing is this Schema.org JSON file &…