var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Info tips script
i want to include info tips script into my site
the script is supposed to show random info tip from all the infotips that i already defined everytime the site opens
so what is needed is to add info tips like 100 or something then the script shows one of them everytime the site is loaded
it doesn't have to have admin side ( maybe i can add the info tips in the php file by myself through text editor )
just 1 php file will be enough for this script - right ?
please help me making this small script
Why not ask this question in the programming forum here at wht, you are more likely to find an answer.
Hope that Helps
redihot.com | low cost quality hosting
Looking for a web hosting solution? Gain complete satisfaction today.
With our 99.95% Uptime Guarantee, 24/7 Monitoring, Friendly Support, Cpanel/Fantastico, Domains and much more, why wait?
oh, my bad
please somebody move the thread if it's not the right forum
Put all your tips in a file named
tips.txt, one tip per line:
Do this to get a random tip:
This is a tip.
This is another tip.
More tips on the way.
They don't end.
// load the tips into an array
$tips = file ( 'tips.txt' );
// get a random tip
$random_tip = $tips [ array_rand ( $tips )];
// print it out
echo 'Tip of the day: ' , $random_tip ;