son.of.the.morning Posted December 30, 2011 Share Posted December 30, 2011 I am using cakephp to create a cms and i have used the html form helper method to create my form object to add a new news feed (Post). The code seems fine to me, however i still keep getting this error (unexpected T_DOUBLE_ARROW). Here is my code <?php echo $form=>create('Post',array('action'=>'add')); echo $form=>input('title'); echo $form=>input('body'); echo $form->end('Add post'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/254089-t_double_arrow-error-s/ Share on other sites More sharing options...
Adam Posted December 30, 2011 Share Posted December 30, 2011 Should be "->", not "=>" to access object properties and methods. Quote Link to comment https://forums.phpfreaks.com/topic/254089-t_double_arrow-error-s/#findComment-1302630 Share on other sites More sharing options...
son.of.the.morning Posted December 30, 2011 Author Share Posted December 30, 2011 Bang on the dot, what a idiot i am! Thanks boss! Quote Link to comment https://forums.phpfreaks.com/topic/254089-t_double_arrow-error-s/#findComment-1302631 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.