[thelist] Joomla anyone? also PHP randomizer?

Paul Bennett Paul.Bennett at mch.govt.nz
Sun Aug 23 20:40:53 CDT 2009


I'm normally loathe to solve someone's problem for them when they aren't
willing to do any leg work themselves, but I'll make an exception today
;)

//php
function randNumber($limit){
	// validate your input
	if(ctype_digit($limit) and $limit > 1){
		return rand(1,$limit);
	}
	// invalid - return a default
	else{
		return 1;
	}
}


// html
<div id="wrapper"><div class="dancer" id="dancer<php echo randNumber();
?>"> 

www.mch.govt.nz  -  www.teara.govt.nz  -  www.nzhistory.net.nz  -  www.nzlive.com

The information contained in this email message does not necessarily reflect the views of the Ministry for Culture and Heritage and may contain information that is confidential or subject to legal privilege. If you are not the intended recipient and receive this email in error: please notify the Ministry for Culture and Heritage by return email or telephone (64 4 499 4229) and delete this email; you must not use, disclose, copy or distribute this message or the information in it.

PLEASE CONSIDER THE ENVIRONMENT BEFORE YOU PRINT THIS EMAIL






More information about the thelist mailing list