[code]<?php

function print_r(array,lfchar,wschar,lvl) {
	if(!wschar) {wschar = '  ';}
	if(!lfchar) {lfchar = '<br/>';}
	if(!lvl) {lvl = 0;}
	var output = '';
	if(typeof(array)=='object') {
		var a=0;
		output += 'array(<br/>';
		lvl++;
		while(a<array.length) {
			output += str_repeat('  ',lvl)+'['+a+'] = '+print_r(array[a],lfchar,wschar,lvl)+'<br/>';
			a++;
		}		
		lvl--;
		output += str_repeat('  ',lvl)+')';
	} else {
		output = array;
	}
	return output;
}

//repeat a string for the given times
function str_repeat(str,times) {
	var a=0;
	output = '';
	str = str.toString();
	while(a<times) {
		output += str;
		a++;
	}
	return output;
}

?>[/code]

[i]i:[/i] kopieer niet de < ?php en ? >. Deze heb ik enkel erbij geplakt voor syntax-highlighting.