Jump to:

5513 Posts in 1732 Topics by 1218 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: 291 Views
  • gonace
    Avatar
    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
    Avatar
    Community Member
    138 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:

    print_r($Image);

    291 Views
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.