Zmienna o nazwie $attachments zwraca wartości obiektu:
stdClass Object ( [ID] => 73 [post_author] => 1 [post_date] => 2011-12-29 09:47:46 [post_date_gmt] => 2011-12-29 09:47:46 [post_content] => [post_title] => i2 [post_excerpt] => [post_status] => inherit [comment_status] => open [ping_status] => open [post_password] => [post_name] => i2 [to_ping] => [pinged] => [post_modified] => 2011-12-29 09:47:46 [post_modified_gmt] => 2011-12-29 09:47:46 [post_content_filtered] => [post_parent] => 71 [guid] => [url="http://XXX/projekty/XXX/wp-content/uploads/2011/12/i2.png"]http://XXX/projekty/XXX/wp-conte.../2011/12/i2.png[/url] [menu_order] => 0 [post_type] => attachment [post_mime_type] => image/png [comment_count] => 0 [filter] => raw )
chce ją dać do pętli:
foreach($attachments as $big){ }
i wywala mi błąd ;(
Kod
Fatal error: Cannot use object of type stdClass as array in /home/XXX/domains/XXX/public_html/projekty/XXX/wp-content/plugins/file-gallery/templates/default/gallery.php on line 3
proszę o pomoc/wskazówkę w czym tkwi błąd
