problem with a class
Posted: Sat May 24, 2003 9:21 pm
i have a class for my html template, in there is a function like this
the $online_string, $online_list variables are in a file included before the class. How can I use those variables in the class because what i have now fails, anyone have any idea how I can make this work, i tried using $GLOBALS first btw but it doesnt work.
Code: Select all
// Other file
$online_string = "1,2,3,4,5,6";
etc.....
<?php
function CreatePage() {
if ($GLOBALS[online_string]) {
$this->SetParameter("online_string", $online_string);
$this->SetParameter("online_list", $online_list);
$this->SetParameter("online_guests", $guests_online);
$this->SetParameter("online_total", $totalonline);
}
?>