Skip to content

Instantly share code, notes, and snippets.

@thefrosty
Created January 20, 2012 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefrosty/1649284 to your computer and use it in GitHub Desktop.
Save thefrosty/1649284 to your computer and use it in GitHub Desktop.
Empty array()
Why is this returning an empty array()?
$order-items->name = empty array()
$order->items =
[items] => Array
(
[0] => Array
(
[id] => 88
[variation_id] => 95
[name] => Custom Login Pro
[qty] => 1
[cost] => 10
[base_cost] => 10
[taxrate] => 0
[item_meta] => Array
(
)
)
)
Also tried $oder->items[0]->name with no luck..
@thefrosty
Copy link
Author

Thank you Michael Fields! $order->items[0]['name']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment