Christopher: Array in einem Objekt auslesen

order Object
(
    [info] => Array
        (
            [order_status] => 1
            [currency] => EUR
            [currency_value] =>
            [payment_method] => invoice
            [cc_type] =>
            [cc_owner] =>
            [cc_number] =>
            [cc_expires] =>
            [cc_start] =>
            [cc_issue] =>
            [cc_cvv] =>
            [shipping_method] => Deutsche Post (Die Versandkosten können im Moment nicht errechnet werden (55 x 49.34 kg))
            [shipping_cost] => 0
            [comments] =>
            [shipping_class] => dp
            [payment_class] => invoice
            [subtotal] => 15288.79
            [tax] => 2108.7986206897
            [tax_groups] => Array
                (
                    [inkl. UST 16%] => 2108.7986206897
                )

[total] => 15288.79
        )

[totals] => Array
        (
        )

[products] => Array
        (
            [0] => Array
                (
                    [qty] => 1
                    [name] => Pflanzentopf
                    [model] => 123-456788
                    [tax_class_id] => 1
                    [tax] => 16
                    [tax_description] => UST 16%
                    [price] => 5.79
                    [final_price] => 5.79
                    [shipping_time] => 3-4 Tage
                    [weight] => 2.00
                    [id] => 2
                )

[1] => Array
                (
                    [qty] => 85
                    [name] => 29 Zoll Röhrenmonitor
                    [model] => 321-456798
                    [tax_class_id] => 1
                    [tax] => 16
                    [tax_description] => UST 16%
                    [price] => 179.8
                    [final_price] => 15283
                    [shipping_time] => 3-4 Tage
                    [weight] => 29.00
                    [id] => 4
                )

)

Wie kann ich in diesem Beispiel, dass Array Products direkt aufrufen ???
Ohne mir eine Hilfsarray zu machen, dass nicht in dem Objekt ist !!!

Besten Dank im Vorraus

  1. Hallihallo,

    $order->products[x]
                                 [qty] => 1
                                 [name] => Pflanzentopf
                                 [model] => 123-456788
                                 [tax_class_id] => 1
                                 [tax] => 16
                                 [tax_description] => UST 16%
                                 [price] => 5.79
                                 [final_price] => 5.79
                                 [shipping_time] => 3-4 Tage
                                 [weight] => 2.00
                                 [id] => 2

    Meintest Du, wie Du direkt auf die Elemente des Arrays zugreifen kannst?
    Aufrufen kannst Du da nichts, sind doch keine Funktionen oder Unterprogramme.

    LG
    Chris©