The feed might say something like.. Tino just changed his location to Heerlen, Netherlands.
Both the city an country are added in a separate actions when you change both the city and the country in the account settings.
If you update both of these fields at the same time the news feed query will concatenate those actions. Resulting in...
action_id details
userlocation~usercity Netherlands~Heerlen
Then I use explode to seperate them into an array.
Then I use a foreach loop to output the data.
In my foreach I have...
if($i > $max) break; if($i == $max || ($i == count($information) && $i > 1)) echo ' and '; else { if($i > 1) echo ', '; }That works great for all of the other actions because it will say something like...
Tino has update his profile picture and settings.
But it fails when I need it to say...
Tino has update his location to Heerlen, Netherlands.
Any easy php fix for this or would I have to adjust the query?