Hi, i got an answer on an older question wich is almost working
i have a function:
function vraagOp($table,$where)
{
static $rVraagOp;
if(!$rVraagOp){
$qVraagOp = "SELECT * FROM $table WHERE $where";
$rVraagOp = mysql_query( $qVraagOp );
}
return mysql_fetch_assoc( $rVraagOp );
}
that i want to use like this
while (vraagOp("testtable","testtype = test"))
{
echo "testing <br>";
}
the function works fine however i can only use it one time per page. the second time i call it it doesn't do anything. no error either, it's just like the function never happend.
what do i have to change in order to make it work multiple times and still work in the while loop?