Daten aus Array sortiert ausgeben

loddarmattheus

Erfahrenes Mitglied
Hallo und guten Morgen,

angenommen ich lese externen JSON-Code ein und meine Abfrage liefert mir nach einem
PHP:
echo "<pre>";
var_dump($alle);
echo "</pre>";

folgende Ausgabe:

Code:
array(1) {
  ["eth_btc"]=>
  array(300) {
    [0]=>
    array(5) {
      ["type"]=>
      string(3) "bid"
      ["price"]=>
      float(0.05794981)
      ["amount"]=>
      float(0.43913555)
      ["tid"]=>
      int(109734761)
      ["timestamp"]=>
      int(1532611326)
    }
    [1]=>
    array(5) {
      ["type"]=>
      string(3) "bid"
      ["price"]=>
      float(0.05794981)
      ["amount"]=>
      float(0.92028299)
      ["tid"]=>
      int(109734748)
      ["timestamp"]=>
      int(1532611316)
    }
    [2]=>
    array(5) {
      ["type"]=>
      string(3) "bid"
      ["price"]=>
      float(0.05794982)
      ["amount"]=>
      float(0.15408905)
      ["tid"]=>
      int(109734732)
      ["timestamp"]=>
      int(1532611306)
    }
    [3]=>
    array(5) {
      ["type"]=>
      string(3) "bid"
      ["price"]=>
      float(0.05794982)
      ["amount"]=>
      float(0.73817428)
      ["tid"]=>
      int(109734657)
      ["timestamp"]=>
      int(1532611273)
    }

Wie bekomme ich es am einfachsten hin, dass mir eine foreach oder while zeilenweise die einzelnen Werte des Arrays ausgibt:

type: bid price: 0.05794981 amount: 0.43913555 timestamp: 1532611326
type: bid price: 0.05794981 amount: 0.92028299 timestamp: 1532611316
type: bid price: 0.05794982 amount: 0.15408905 timestamp: 1532611306
type: bid price: 0.05794982 amount: 0.73817428 timestamp: 1532611273
...

Danke im Voraus.
 
Zurück