I'm trying to print all properties to a model with <? print_r($Image); ?> but get an "Parse error: syntax error, unexpected" error message. Why? The object works but I'm looking for a list of properties to this object.
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.
Are you including the '<?' ? If you're putting that in the middle of your class, that's why. The PHP opening tags are already at the start of the file, you don't need to add them again. You shouldn't use the closing tags either. Just use:
print_r($Image);