MyBB Central

Full Version: Need a php script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wan to have random background images on my site however everywhere I go the script is so slow it has a white background for a good 5-10 seconds. I found this script on the web but I think it's in html except the one part I need and I need it in php to work.
PHP Code:
<div style="background-image:url(<?php echo rand(1,20) ?>.jpg);></div> 
anyway to utilize the random 1-20 feature and make a full php script out of it?