Learning PHP with an old book, possible?

Hello All,

I bought in 2009 from SitePoint, a copy of the famous book " Build your own database driven web site using php & mysql ", and I want to know if I could read again PHP with this book, as the version of php used in this edition is 5.2.9

Is that possible ? or there is a big difference between this version of PHP and the actual version ? Thanks for your advices.

By the way, I’m following in the same time also, an online learning video on lynda.com that I found it very interesting, it called " PHP with MySQL Essential Training ". But the idea to read also the book that I mentioned above, is to be able to read in the metro or train.

Again thank you for your advices, and best regards.

Well, the current version is titled
PHP & MySQL: Novice to Ninja

But the 2009 edition isn’t completely useless.
It uses mysqli_ functions so is more up-to-date than editions that used the deprecated mysql_ functions. But it doesn’t have PDO which though not necessary to use is preferred over mysqli_ by many.

As long as you already have the book, I see little harm in your reading it again.

Thank you Mittineague for your comment, but what is mean PDO ?

If I good understand your advice, it is better to buy a new book ?

While mysqli_ allows for both procedural and OOP style coding, PDO is OOP but can work with databases other than MySQL

If you plan on working only with MySQL in the near future or are relatively new to OOP then you should be fine.

IMHO the most important thing is to learn how to use bound statements, it will save you a lot of grief

Thank you Mittineague for your advices, I
will find what you are talking about, as I’m still reading now, so it is
not easy for me to understand all what you said.

I have a question, and I believe that you know the answer :

During watching a php video, the man explained something like the following :

$b = <<<BB
Hello world
BB;

echo $b;

I want to understand the using of <<< as I could’t find it on google

Thanks

That’s the heredoc syntax, it’s an alternative method of delimiting strings.

Thank you fretburner, someone told me that it is not originaly in PHP but in another language, like C Sharp, is that ture ?

What isn’t? heredoc? If so, you were mis-informed, that has been in PHP for a long time. I do not know of that feature existing in C#.

Thank you cpradio, anyway I saw it for the first time in the following youtube video

But as I’m learning during this period the following corses on lynda
http://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html
and Kevin ( the PHP teacher inside this course) has never talked about this code, for that I doubt, and I don’t know which one of the both ( lynda’s teacher and youtube’s teacher ) is talking about the recent PHP programming way, or which one has the right way, or maybe the both ?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.