Jump to content

old versions of php


jadenrose

Recommended Posts

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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. 
Link to comment
Share on other sites

[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]<?php

class 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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.