2007. 04. 5, csütörtök keltezéssel 20.29-kor itoctopus ezt írta: > I beg to differ with everyone who said there's no difference between the > single quote and double quote. > Although the double quote is much more flexible, the single quote is better, > as there will be no evaluation of the string for potential variables inside > the string. at the opcode level there is no difference if there are no variables involved. of course, the compiler in the first pass must check for variables within double quotes, but it does check strings within single quotes also - for escaped characters and stuff like that. greets Zoltán Németh > > And Chris, about the book, go for PHP5 Power Programming by Prentice Hall, > it's the best in the market in my opinion, it teaches the language itself, > as well as best practices, all in an OOP twist. > > -- > itoctopus - http://www.itoctopus.com > ""Tijnema !"" <tijnema@xxxxxxxxx> wrote in message > news:d8269d910704051501g7a8c1127ybe86b14145406529@xxxxxxxxxxxxxxxxx > On 4/5/07, Zoltn Nmeth <znemeth@xxxxxxxxxxxxxx> wrote: > > 2007. 04. 5, cstrtk keltezssel 12.52-kor Chris Lott ezt rta: > > > Looking for suggestions for a PHP textbook for an "Intro to Web > > > Programming" class that will be using PHP5 and MySQL. This is a > > > first-semester course, so no programming experience required. > > > > > > It would be nice to have a text that adhered to (what I see as) good > > > practice using quotation marks... i.e. > > > > > > print 'The cost is ' . $cost; > > > NOT > > > print "The cost is $cost"; > > > AND CERTAINLY NOT > > > print ("The cost is $cost"); > > > > > > echo substr('abcdef', 1); > > > NOT > > > echo substr("abcdef", 1); > > > > there is no difference between the above two echo statements. I'm almost > > sure that there is absolutely zero difference between the two kind of > > quotes when there are no variables involved > > > > greets > > Zoltn Nmeth > > I prefer using double quotes (" ") around strings, because i don't > have to escape single quotes (' ') in words like I'm, don't, etc. > > Tijnema > > > > > > > > > > > I will be teaching, so a book that a student can-- before the class-- > > > work through and understand is good-- doesn't have to be a traditional > > > textbook! But it shouldn't be a reference manual either. > > > > > > c > > > -- > > > Chris Lott > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php