I have a set of PHP arrays coming from an outside service. I only want the most recent however, how can I get this in PHP.
The Array is like this:
{"responseCode": 200, "message": "success"}
I am splitting it apart like this:
foreach ($submissions as $submissions) {
print "<p><b>" . $submissions["message"] . "</b><br>";
}
The problem is every time I do this, it returns the Message and Response Code from all of the arrays returned by my code. This is obviously due to the fact I am loping it, "for each" but how can I set this to only loop once?