If my file format is like this:
Eugene,Tan,45,1
Charles,Babbage,42.5,1
<?
if(!$fp=fopen("emp.txt","r")){
echo("errrrrrrrrr");}
else
{
while (!feof($fp) ) {
$buffer = fgets($fp, 4096);
$eachword =exploe(",",buffer); for($i=0;$i<count($eachword);$i=$i+1)
print"$eachword[$i]<br>\n";
}
}
?>
Now my problem is that when i write for loop outside while loop it dosent work it means that array eachword is not initialized.Why???is so coz explode returns array of string and
array once initlialized can be used any where.
one more thing HOW CAN WE INCRIMENT ARRAY SUBSCRIPTS????Plz help me at the earliest.