Andrew McDonough

Please note: This page is imported from my wiki, which hasn't been updated in over 10 years. Some of the formatting was lost during the import. I'll try to get around to fixing it someday.



Walks through an assosiative array and initializes variable with names of the keys and values of the values.


returns all variables valid in the current scope


Explode = Split

array explode (string separator, string string [, int limit])

Implode = Join

string implode (string glue, array pieces)

Useful functions

string strtolower (string str) string strtoupper (string string)

Special Variables

$POST - an associative array of the arguments sent via a post request $GET - an associative array of the arguments sent via a get request

$argv[0] - the get string


PHP on the Command line

Reading input and writing output: $input = fgets(STDIN); fwrite(STDOUT, “My name is $input”); exit(0);

$argc contains the number of arguments (including the script name), $argv contains the array of these (with the 0th element being the script name)

Template Systems

Savant, Smarty, Flexy|Installing GD

Andrew McDonough

Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.

Follow Andrew on Twitter or Connect on LinkedIn