I am trying to write a function in PHP, but being a novice I am finding it a bit difficult to do so. I have an array which looks like
[{"x":"12345","y":"john"},{"x":"12345","y":"stars"}]
The function which I am writing is
function getCSV($x)
{
// Now I want to pass the $x which in the above array is 12345 and get "john,stars" as output
}
Are there any methods available in PHP that can do this, or what would be the best approach to get it?