Learn PHP in 24 Hours

SAMS Teach Yourself PHP in 24 Hours, 3rd Edition courtesy of the Association for Computing Machinery

This post was created as a reference point.

PHP Standard Data Types

There are 6 standard data types in PHP. They are:

  • Integer
  • Double
  • String
  • Boolean
  • Object
  • Array
  • There are also 2 Special Data Types. They are:

  • Resource
  • Null
  • Testing for a specific data type.

    Functions to test data types

  • is_array()
  • is_bool()
  • is_double()
  • is_int()
  • is_object()
  • is_string()
  • is_null()
  • is_resource()
  • Operators and Expressions

    An operator is a symbol or series of symbols that, when used in conjunction with values, performs an action and usually produces a new value.

    An ...

    Read more →

    PHP Best Practices

    PHP Best Practices & Notes

    The following notes are listed for reference to PHP development.


    MySql Query Example
    // mysql_query(“SELECT * FROM searchengine WHERE keywords LIKE ‘%mike%’ OR keywords LIKE ‘%stratton%'”);



    PHP Safe Mode is deprecated.


    The following php script can test the connection to your database.
    Create a php file with the following code and save as test.php. Upload to your web server and run the script from a browser.
    $host = ‘localhost';
    $user = ...

    Read more →