I want to find all % and get the number before them. I want to search till I can't find anymore, but it´s seems like it can't stop searching, so I belive that I have to find the nummer of % and then but it in a loop. Is there any way to solve it in a WHILE loop? Here's the code;
$disksout= file($file);
$disksout=implode($disksout,"");
("\n",",",$disksout);
//$disksouttext=fgetss($disksout, 255);
echo $disksout;
$count=10;
for ($i=0; $i<=$count; $i++)
{
if (!$offset)
{
$offset=0;
}
$pos=strpos ($disksout, "%", $offset);
$pos=$pos-2;
$result[]= substr($disksout, $pos, 2);
$offset=+$pos+3;
}