Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 12:17 pm EST
Geeklog Forums
PHP Formatting Error
Max
Anonymous
Hey all!
Here's my problem. I currently have a PHP blok calling this function:
{
$max_number_of_products = 5;
$random_product = rand(1,$max_number_of_products);
if ($random_product == '1') { include 'jimmy_g.php'; } else {}
if ($random_product == '2') { include 'ryan_b.php'; } else {}
if ($random_product == '3') { include 'bill_h.php'; } else {}
if ($random_product == '4') { include 'chris_n.php'; } else {}
if ($random_product == '5') { include 'eric_s.php'; } else {}
end;
}
I have the various files saved in the SYSTEM folder. So I run this function, and the file runs at the top of my header:
here
What do I need to do to get it to display in the called block?
Thanks!
Max
Here's my problem. I currently have a PHP blok calling this function:
Text Formatted Code
function phpblock_playspot(){
$max_number_of_products = 5;
$random_product = rand(1,$max_number_of_products);
if ($random_product == '1') { include 'jimmy_g.php'; } else {}
if ($random_product == '2') { include 'ryan_b.php'; } else {}
if ($random_product == '3') { include 'bill_h.php'; } else {}
if ($random_product == '4') { include 'chris_n.php'; } else {}
if ($random_product == '5') { include 'eric_s.php'; } else {}
end;
}
I have the various files saved in the SYSTEM folder. So I run this function, and the file runs at the top of my header:
here
What do I need to do to get it to display in the called block?
Thanks!
Max
6
6
Quote
mach
Anonymous
Text Formatted Code
function phpblock_playspot(){
$max_number_of_products = 5;
$random_product = rand(1,$max_number_of_products);
if ($random_product == '1') { $retval = 'jimmy_g.php'; } else {}
if ($random_product == '2') { $retval = 'ryan_b.php'; } else {}
if ($random_product == '3') { $retval = 'bill_h.php'; } else {}
if ($random_product == '4') { $retval = 'chris_n.php'; } else {}
if ($random_product == '5') { $retval = 'eric_s.php'; } else {}
return $retval;
}
6
8
Quote
All times are EST. The time is now 12:17 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content