Description
monju_print is an advanced print function which caters to variable type and escapes html output to avoid Cross Site Scripting Attacks. (XSS)
Parameters
$data: Array, boolean, int, float etc. which is to be printed. [type:mixed]
Return Values
Result of the monju_print is printed. On Success: True [type:boolean] On Failure: False[type:boolean]
Notes
Does not support printing objects.
Examples
// possible XSS attack // $_GET['queryString'] is set to some javascript string monju_print($_GET['queryString']); // escaped queryString is printed safely $arr = array('1', array('1', '2'), 3); monju_print($arr); // recursively prints the array, wrapped in xhtml pre tags.
Dependencies
None.
If you notice a mistake in the documentation, instead file a bug report in the issue tracker. Instead use this to add tips and tricks associated with the functions. You can use tags like to keep your comments clear.