I know I messed this up badly and would like to know how to fix this
[code=php]
// Total random Start
function randomQuote ($file) {
$f = file($file);
$k = array_rand($f);
$q = $f[$k];
}
$proxiesrandom = randomQuote(“random_link.txt”);
$sRow = $proxiesrandom;
$random = $sRow[‘randomQuote’];
$tpl->parse(
‘random’,
array(
‘random’ => $q,
)
);
// Total random End
I have a file with
[code=php]<?
function randomQuote ($file) {
$f = file($file);
$k = array_rand($f);
$q = $f[$k];
echo $q;
}
?>
A text file with random quotes
in a normal situation I would be able to use this line
[code=php]<? randomQuote(“random_link.txt”); ?>
but since my design uses tpl I cant
and I need to be able to run this in a tpl file but cant figure out how to add the above into my current design using the parse format from above.