Re: semicolon usage in views
Yeah.. I now remember that. It's been a while since I haven't put the semicolons, so I guess I just forgot. Thanks for the refresher! Dustin Weber On Apr 25, 8:37 am, Jeremy Pointer <[EMAIL PROTECTED]> wrote: > This has nothing to do with cake and everything to do with php > for e.g. in any php file the following will work: > > > but this won't > echo "wateva" > echo "wateva else" > ?> > The parser automatically assumes that if you close the tag > you meant to put a semicolon there. > > Dustin Weber wrote: > > Tried searching for this, but it's a tough search to refine. > > > Basically, I am simply trying to understand when/if we need semicolons > > in a view when using a helper. In fact, I've noticed that I don't > > even need the semicolon when just 'echoing' a var in a view, so it > > isn't just related to helpers. > > > It's something I had never much paid attention to (probably b/c it > > didn't throw any errors, so simply didn't notice). > > > So, in simple terms: > > > > > ...seems to work the exact same as: > > > > (notice the missing semicolon) > > And: > > input('Widget/searchBox', array('size' => '30')); ?> > > ...seems to work the exact same as: > > input('Widget/searchBox', array('size' => '30')) ?> > > > So, I assume Cake is doing some error checking for us? However, is > > this a feature (ie: should I assume I never have to type the > > semicolons again in the views), or should I still add them so that I > > am following the rules? > > > The manual isn't clear on this in it's examples. For instance, I > > pulled this code directly out of the helper section of the manual: > > - > > ... > > > $html->textarea('Note/body', array('cols'=>'60', 'rows'=>'10')); > > ?> > > tagErrorMsg('Note/body', > > 'Please enter in a body for this note.') ?> > > ... > > - > > (notice the semicolon inconsistency) > > > Thanks for any help in advance! > > > Dustin Weber --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: semicolon usage in views
This has nothing to do with cake and everything to do with php for e.g. in any php file the following will work: but this won't The parser automatically assumes that if you close the tag you meant to put a semicolon there. Dustin Weber wrote: > Tried searching for this, but it's a tough search to refine. > > Basically, I am simply trying to understand when/if we need semicolons > in a view when using a helper. In fact, I've noticed that I don't > even need the semicolon when just 'echoing' a var in a view, so it > isn't just related to helpers. > > It's something I had never much paid attention to (probably b/c it > didn't throw any errors, so simply didn't notice). > > So, in simple terms: > > > ...seems to work the exact same as: > > (notice the missing semicolon) > And: > input('Widget/searchBox', array('size' => '30')); ?> > ...seems to work the exact same as: > input('Widget/searchBox', array('size' => '30')) ?> > > So, I assume Cake is doing some error checking for us? However, is > this a feature (ie: should I assume I never have to type the > semicolons again in the views), or should I still add them so that I > am following the rules? > > The manual isn't clear on this in it's examples. For instance, I > pulled this code directly out of the helper section of the manual: > - > ... > $html->textarea('Note/body', array('cols'=>'60', 'rows'=>'10')); > ?> > tagErrorMsg('Note/body', > 'Please enter in a body for this note.') ?> > ... > - > (notice the semicolon inconsistency) > > > Thanks for any help in advance! > > Dustin Weber > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
semicolon usage in views
Tried searching for this, but it's a tough search to refine. Basically, I am simply trying to understand when/if we need semicolons in a view when using a helper. In fact, I've noticed that I don't even need the semicolon when just 'echoing' a var in a view, so it isn't just related to helpers. It's something I had never much paid attention to (probably b/c it didn't throw any errors, so simply didn't notice). So, in simple terms: ...seems to work the exact same as: (notice the missing semicolon) And: input('Widget/searchBox', array('size' => '30')); ?> ...seems to work the exact same as: input('Widget/searchBox', array('size' => '30')) ?> So, I assume Cake is doing some error checking for us? However, is this a feature (ie: should I assume I never have to type the semicolons again in the views), or should I still add them so that I am following the rules? The manual isn't clear on this in it's examples. For instance, I pulled this code directly out of the helper section of the manual: - ... textarea('Note/body', array('cols'=>'60', 'rows'=>'10')); ?> tagErrorMsg('Note/body', 'Please enter in a body for this note.') ?> ... - (notice the semicolon inconsistency) Thanks for any help in advance! Dustin Weber --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---