This example is from php.net:
<?php
function Test()
{
static $a = 0;
echo $a;
$a++;
}
?>
And this is my code:
function getNextQuestionID()
{
static $idx = 0;
return $idx++;
}
And I use it in JavaScript:
'quizID=' + "<?php echo getNextQuestionID(); ?>"
Returns 0 everytime. Why?