Home › Forums › Back End › Random Slogan Displayer › Re: Random Slogan Displayer
February 19, 2010 at 4:44 pm
#70749
john010117
Member
Try:
Code:
<?php
$f_contents = file (“./slogans.txt”);
$line = $f_contents[array_rand ($f_contents)];
print $line;
?>
$f_contents = file (“./slogans.txt”);
$line = $f_contents[array_rand ($f_contents)];
print $line;
?>
or
Code:
<?php
$f_contents = file (get_bloginfo(‘stylesheet_directory’) . “/slogans.txt”);
$line = $f_contents[array_rand ($f_contents)];
print $line;
?>
$f_contents = file (get_bloginfo(‘stylesheet_directory’) . “/slogans.txt”);
$line = $f_contents[array_rand ($f_contents)];
print $line;
?>