jadenrose Posted August 1, 2006 Share Posted August 1, 2006 Hi. I'm kind of fairly new to php. I've been reading a php book and well, looking at some other code..alot of stuff I am seeing is not matching up. Does anyone know how I can find out how to view old versions of php? Quote Link to comment Share on other sites More sharing options...
ChambeRFienD Posted August 1, 2006 Share Posted August 1, 2006 First off, what version of PHP is the book teaching you? Also, what exactly isn't matching up? Quote Link to comment Share on other sites More sharing options...
Caesar Posted August 1, 2006 Share Posted August 1, 2006 There are diferent approaches that produce the same/similar results. For example, a lot of newer code you will see will likely take a more Object Oriented approach (Good thing). My suggestion to you, is you take a look at http://www.php.net and do some reading. Learn the very basics first. Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted August 1, 2006 Share Posted August 1, 2006 yes i agree with Caesar. It's most likely the approach that aren't matching up more than the version, unless you're reading a php 3 book. Quote Link to comment Share on other sites More sharing options...
Caesar Posted August 1, 2006 Share Posted August 1, 2006 For example, using a series of if/else statements can produce the same result as using switch/case. You can also put the functionality into classes...or maybe functions within classes and use objects to optimize overall performance and ease execution. Quote Link to comment Share on other sites More sharing options...
jadenrose Posted August 1, 2006 Author Share Posted August 1, 2006 The book I am reading covers PHP 4 and 5. what I am getting lost on is stuff like this:$this->other stuff here.That is an example of what is confusing me. It could very well be that this code is advanced since the book does not go into the advanced aspects of PHP. Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 1, 2006 Share Posted August 1, 2006 the code you are pionting out is basic class php format ok. Quote Link to comment Share on other sites More sharing options...
Caesar Posted August 1, 2006 Share Posted August 1, 2006 [quote author=jadenrose link=topic=102621.msg407583#msg407583 date=1154468181]The book I am reading covers PHP 4 and 5. what I am getting lost on is stuff like this:$this->other stuff here.That is an example of what is confusing me. It could very well be that this code is advanced since the book does not go into the advanced aspects of PHP. [/quote][CODE]<?phpclass foo {function bar() {$this->variable = 'value';}}?>[/CODE]Is something used within classes. I suggest before trying to figure out the small components, you first figure out what a class is, does, and then break it down. I'm sure your book covers it. Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted August 1, 2006 Share Posted August 1, 2006 yeah the code is object oriented.. which isn't too "advance" but a bit harder and confusing for newcomers. you may want to read up on object oriented programming and php classes. it might be in the later chapters of the book if it covers php5. Quote Link to comment Share on other sites More sharing options...
jadenrose Posted August 1, 2006 Author Share Posted August 1, 2006 I figured it was probably something I just missed. I'll go back and look. Thanks! You guys have been extremely helpful! Quote Link to comment 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.