This site includes Projects (School coursework, work projects, independent projects, and freelance work) and my resume. This also serves as a place to post code and other programming-related information that I have found useful.

I also offer professional web development services for individual and small businesses.

Format to two decimal places

I was looking all around for this and even tried to do it manually, but I found this function number_format. I used it to make sure that a dollar amount was to have two decimal places. Original amount: 5.3
$newAmount = number_format(5.3, 2);
$newAmount = 5.30.

Tags: 

Linux moo command

Tags: 

Function Exists

To see if a function is defined, use the function function_exists. It takes a function name (as a string) as the parameter.
http://us3.php.net/function_exists

Tags: 

highlight_string

This function takes a string of PHP code and displays the code with syntax highlighting.

http://us.php.net/highlight_string

Tags: 

heredoc

This is a way to use HTML code within PHP without having to escape anything.

echo <<<TEST
	<p>some text</p>

TEST;

http://www.tizag.com/phpT/strings.php

Tags: 

Pages

randomness