Jump to:

5538 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » print_r($Image); not working...

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

Page: 1
Go to End
Author Topic: 308 Views
  • gonace
    Community Member
    11 Posts

    print_r($Image); not working... Link to this post

    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.

  • kinglozzer
    Community Member
    139 Posts

    Re: print_r($Image); not working... Link to this post

    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:


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.