I am trying to change some of my functions in to classes and objects. I have been checking out the php.net and google and still not grasping the concept.

here is my example all I am trying to do is print 2 numbers to the browser that are randomly generated from dieRolls.

Thanks in advance

-Blake

class dieRolls{
function dieRolls($die){
$num = rand(1, $die);
$this->num;
}
}


$num1 = new dieRolls("6");
$num2 = new dieRolls("8");
$bar1 = $num1->bar1;
$bar2 = $num2->bar2;
echo"Hi<br>\n";
echo"$bar1<br>\n";
echo"$bar2<br>\n";

--

+-----------------+-----------------+----------------+
| Blake Schroeder | Owner/Developer |    lhwd.net    |
+--(http://www.lhwd.net)------------+--/          \--+

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to