Im usin cURL to crabb some data from webpage. But as the data is array based, but the size changes and varies. Then i need to search for parts of string and want to get everyhting after the part til next comma.
{"id":2988001,"teatiseNr":"50000099027","mkood":74,
Now here is the string. I would only like to have everything after {"id": til the first comma. So my output would be 2988001
Why i need the search criteria is because some times there are more variables and that messes up the order. Right now im using simple
$pieces = explode(",", $page);
And then just delete the rest with
str_replace('{"id":','',$pieces[0]);
There must be more elegant way to make this work.