Hello everyone i am trying to make my first class I am trying to pass a array into the constructor but it is not working correctly
$questionnumbers[0] = "1";
$questionnumbers[1] = "3";
$newtf = new tf("$questionnumbers", "$db");
//this class is to hold all of the true false questions from the db
class tf
{
var $i;
function tf($questionnumbers, $db)
{
while($i<count($questionnumbers))
{
echo $questionnumbers[$i];
$i++;
}
}
I would expect to see 1 and 3 but all I see is A on the screen. Whats the trick??
Thanks
D