General API

Summary
implode() work-alike, but working for associative arrays (taken from http://www.php.net/implode)
Determines if a value is in or equal to a variable
Prepares a string (possibly with slashes) to be displayed in an HTML context.
Recursively flatten multidimensional arrays into a single dimension array.
Derive name of current page from environmental variables.
Compare a version number with single or multiple dots against an arbitrary versioning number.
Converts email addresses and URLs into links.

Functions

implode_with_key

function implode_with_key ($assoc,  
$inglue =  '=',
$outglue =  '&')

implode() work-alike, but working for associative arrays (taken from http://www.php.net/implode)

Parameters

$assocAssociative array
$inglue(optional) Glue between key and value.  Defaults to ‘=’.
$outglue(optional) Glue between elements.  Defaults to ‘&’.

Returns

String

in_this

function in_this ($var,
$val)

Determines if a value is in or equal to a variable

Parameters

$haystackVariable to search in
$needleVariable to search for

Returns

Boolean, whether variable is found.

prepare

function prepare ($string,  
$force_conversion = false)

Prepares a string (possibly with slashes) to be displayed in an HTML context.

Parameters

$stringString to be displayed
$force_conversion(optional) Do we force conversion of embedded HTML tags?  Defaults to false.

Returns

HTML safe string

flatten_array

function flatten_array ($initial_array)

Recursively flatten multidimensional arrays into a single dimension array.

Parameters

$inital_arrayArray to be flattened.

Returns

Single dimensional array.

page_name

function page_name ($page_name = "")

Derive name of current page from environmental variables.

Parameters

$page_name(optional) Full request URI of page.  If none is provided, the current page name will be used.

Returns

Name of the PHP script.

version_check

function version_check ($version,
$minimum)

Compare a version number with single or multiple dots against an arbitrary versioning number.

Parameters

$versionVersion to test
$minimumArbitrary version to check against.

Returns

Boolean, depending on whether the version was greater than the provided value.

linkify

function linkify ($original)

Converts email addresses and URLs into links.

Parameters

$originalOriginal string to be translated.

Returns

Linked text.

function implode_with_key ($assoc,  
$inglue =  '=',
$outglue =  '&')
implode() work-alike, but working for associative arrays (taken from http://www.php.net/implode)
function in_this ($var,
$val)
Determines if a value is in or equal to a variable
function prepare ($string,  
$force_conversion = false)
Prepares a string (possibly with slashes) to be displayed in an HTML context.
function flatten_array ($initial_array)
Recursively flatten multidimensional arrays into a single dimension array.
function page_name ($page_name = "")
Derive name of current page from environmental variables.
function version_check ($version,
$minimum)
Compare a version number with single or multiple dots against an arbitrary versioning number.
function linkify ($original)
Converts email addresses and URLs into links.