Well, if you put double quotes, you then can put variables inside a string and they will be replaced by proper values. Single quoted strings are not parsed.
I tend to use single quotes because it is supposedly a bit faster to process by the PHP parser. You can read more about these here: http://www.trans4mind.com/personal_development/phpTutorial/quotes.htm http://spindrop.us/2007/03/03/php-double-versus-single-quotes/ Welcome to the PHP world! ;-) On Apr 25, 3:58 pm, rtanz <[EMAIL PROTECTED]> wrote: > cheers that worked perfectly, another thing while we're at it, i am > noticing that the code works the same whether you use single or double > quotes, is one or the other better? Sorry might be a php thing and > nothing related to cake, im not an expert in php itself either. thanks > > On Apr 25, 3:52 pm, seb <[EMAIL PROTECTED]> wrote: > > > rtanz wrote: > > > tried that and got this error > > > > Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/jpgalea/ > > > public_html/survey/app/views/surveys/edit.ctp on line 9 > > > Sorry for that, I should have done a cut & paste from my own code. Made > > a typo by forgetting to enclose all things related to select field > > inside an array. Hey, this is Friday, I'm a bit tired ! :D > > > Here is the right syntax : > > > echo > > $form->input("my_field_name",array("type"=>"select","options"=>array("0"=>"NO","1"=>"YES"),"selected"=>"1")); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---