Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

sprintf($object) to show all properties (SS 2.4)


Go to End


3 Posts   1498 Views

Avatar
gonace

Community Member, 11 Posts

28 February 2013 at 3:10am

I wan't to know if there's a way to print all properties of an object in silverstripe?

Cant seem to find a way...

Avatar
Willr

Forum Moderator, 5523 Posts

28 February 2013 at 8:57pm

In PHP you can just do print_r() on an object to see all the properties.

Avatar
gonace

Community Member, 11 Posts

2 September 2013 at 6:07pm

<? print_r($Image); ?>

Gives me:
Parse error: syntax error, unexpected