In your valiant conquest of the web development industry, you will notice that some scripts will require that you know the current URL the user is browsing to provide certain services. A prime example would be in user management- where we make use of query strings to keep track of users. More practical solutions may even demand that we find the current URL to display relevant ads and increase conversion rates. PHP has set forth certain global variables that...
Foreword: There comes the time in every web developer’s escapades that he or she needs to find an odd or even number. Perhaps for use in alternating color schemes in blog comments, or even for more serious applications such as error checking. Whatever the case may be, we can write up a simple function or IF statement to do the hard work for us. Find An Odd Or Even Number With The IF Statement We can check for whether or not a number is even or odd by...
Foreword: Arrogance runs thick among the LearnPHPOnline.com programmers- we hate doing more work than we have to! Commenting is something that is normally ignored by new or lazy programmers, but both groups soon find commenting saves much more time than it takes. Comments may only viewed by those who make changes to the code itself- the PHP engine doesn’t parse anything designated as a comment. A good example of this is seen below, where the first line...
Foreword: The include statement built into PHP is going to save web developers a heap of time in making their web application. What we’re going to see in this tutorial is how we use the include statement to duplicate repetitive tasks, clean up code, and overall expand our knowledge on the PHP language. Onward! PHP Include Tutorial – Basics Of The Include Language Construct It should be noted that, much like the Echo statement in PHP, Include is...
Foreword: We have established that PHP is a web development language that can make developers a hefty sum of money. Before we can start learning the language, we need to know a few things. What exactly is PHP, where did it come from, and what exactly does learning the language do for developers? PHP Echo Vs Print: Which Should Developers Use? The biggest triviality that plagues most newcomers to PHP is the fact that there are two commands that do (what appears...