View RSS Feed

PHP coding

PHP and mySQL related tips and code.

  1. Before You Start: the basics, for PHP in particular and for programming in general

    I wanted to take a few moments to talk about some of "the basics" that are all-to-often glossed over...

    A Matter of Style

    In general, I find that most PHP programmers fall into one of three main programming styles:
    • procedural: a simple ordered set of instructions, nested if's/ else's, etc.
    • functional: functions are little code containers that you can call on when needed. You [usually] give them arguments, they [usually] return values to you.
    • object-oriented:

    Updated 12-17-2012 at 02:49 AM by traq

    PHP coding
  2. Taking Control

    Last week, I wrote about taking a "PHP-first" approach to programming - program first, output last. But what should go first in your program?

    You may have heard about something called "MVC" (Model-View-Controller). If not, here's your crash course:


    Your Model is all of the information needed/used by your program. [Hopefully], the Model is well-organized. Think of it in terms of note-taking: notes are easier to ...
  3. Every PHP Tutorial Is Wrong

    Many PHP tutorials begin with an introduction to the "basics" of the language: the <?php ?> tags, and usually the echo construct. For example, something like this:

    PHP Code:
        <title>My First PHP Page</title>
    echo "Hello World!";
    Before I blast this, I want to ...

    Updated 11-03-2012 at 01:27 AM by traq

    PHP coding , Web Design issues
Page 2 of 2 FirstFirst 12