Skip to content

Showing color from ternary operator

I am trying to show a color if my ternary operator comes back as true and another one if it comes back as false. The operator is working but one thing is off. The code inside of the double quotes …

Remove item from JSON returned from API

I’m new to PHP and have some trouble trying to delete an item from some data returned by an API Here is the JSON data, I want to remove the item with Id 11, how can I do this? Answer Decode the data. Remove the item from the array. Optionally encode it again as string if needed.