Defining format for fscanf with "%s\t,\t
<p>hey guys was hoping you could help me out,</p>

<p>I am relatively new to php and trying to read a file that is formatted as such</p>

<pre><code>asdf    ,   asdf    ,   asdf
</code></pre>

<p>i.e a string followed by a tab, comma and another tab, then another string followed by a tab, a comma and another tab, then another string, then end of line (if theres another line).</p>

<p>I am learning regular expressions (from here <a href="http://weblogtoolscollection.com/regex/regex.php" rel="nofollow">http://weblogtoolscollection.com/regex/regex.php</a> ) but dont think they you apply regular expressions in fscanf?</p>

<p>basically my code is</p>

<pre><code>$file=fopen("sites.txt","r");
while($line=fscanf($file,"...")){
    list($a,$b,$c)=$line;
echo "$a    $b    $c   &lt;br&gt;";


}
</code></pre>

<p>so basically I want help on what should come in place of the "...", and also an explanation on how its working cause ive been googling for quite a while and cant seem to find what i am looking for. Thanks.</p>
