This is what I get when echo a variable called $SessionID
:
string(76) "{"jsonrpc":"2.0","id":1,"result":"a0440004cf00a89c25377c9cdsf357f50644eec46fd96"}"
I wish to only echo the "result" part of this data, i.e, a0440004cf00a89c25377c9cdsf357f50644eec46fd96. How do I accomplish this?
I have already tried json_decode to no avail(it also echos the entire $SessionID
as above without any change:
$decoded_data= json_decode($SessionID);
echo $decoded_data->result;
I have an inkling this might be because of the "string(76)" prepended to the response.