I'm a newbie in PHP so I searched and read a lot of article but can not find any solution in here or somewhere else.My problem is I have a dynamic string like
[{"NAME":"jennifer lopez"},{"Name":"Ricky Martin"}]
or
[{"NAME":"Tom and Jerry"},{"Name":"Donald Duck"},{"Name":"Rick And Morty"}]
it always changes so I want to take only the names like; jennifer lopez Ricky Martin or Tom and Jerry Donald Duck Rick And Morty.I tried
$pos = strpos($newarray,":")+2;
$pos1 = strpos($newarray,"}")-1;
$pos2 = $pos1-$pos;
But it only returns Jennifer Lopez.