I hava a construct like this:
<?php
$token=strtok($var,";");
while($token!=false)
{
for($i=1;$i<=number_scores;$i++)
{
$score_token=strtok($var2,";");
$k=0;
while($score_token!=false)
{
$k++;
$score_token=strtok(";");
}
$score_token=strtok($var3,";");
while($score_token!=false)
{
$k--;
$score_token=strtok(";");
}
echo $k;
}
$token=strtok(";");
}
?>
This code is not working as expected as the string tokenizer is being updated by the inner tokenizers and the outer tokenizer is running only once. What is the work around for this??