some scripts or PHP functions to deal with html and code.
you can click on every built-in PHP function in the code to see the PHP manual entry for that function.

choose the function or script you need from the category “html and code”

alternate row colors (download - demonstration)

this will output a table with alternating row backround colors. with this the user can read the entries much easier

convert html (download)

strip html and javascript from string.

extract vars (download)

this helps if you want to make these old scripts working with register globals off ... since PHP version 4.2 you can't get POST or GET variables like you could in the old versions. So to use your old scripts you either would have to rewrite the whole thing (which would be the more secure solution), but sometimes this is a lengthy procedure. This is where this snippet jumps in. Place this on top of all the files and it will get your variables.

floating div (download)

this javascript gives you an iframe-type floating layer.

force PHP in HTML (download)

put this in a .htaccess file to force the server to recognize PHP in .html files. after doing this you don't need to rename your files to .php anymore

get offsite code (download - demonstration)

this code grabs the html code from any website. use it to filter out relevant info or text.

html entities (download - demonstration)

this snippet shows all characters as chr(), html-entity and URLencoded

html head (download)

function to generate a html page header.

meta tags (download)

HTML neta tags to put in your html head to get you covered

prime numbers (download - demonstration)

function to check wether a number is a prime number or not. returns TRUE if number given is a prime number and FALSE if not.

simple bar chart (download - demonstration)

this simple bar chart doesn't require any image manipulation software on the server. it's done only in html and uses percentages in tables to show the chart.

simple php code highlight (download - demonstration)

this snippet highlights a php file and numberes the lines. show php code in a nice layout.

view php source (download)

this will show you the source of any PHP file with syntax-highlighting