I'm currently trying to parse a tab seperated file and whenever I try to ouput the info from the array, nothing gets outputed. If I do a count on the array, I get the proper number of fields which are there but when I try to print them out, doesn't seem to matter which way, nothing at all shows up.
Here's the code to read in the data:
while($line = fgetcsv($fp, 1000, "\t"))
{
$num = count($line);
for($i = 0; $i < $num; $i++) {
print $data[$i];
}
}
and here's sample data:
1 Ron Bewski 150 Abbotsfield Drive Winnipeg Manitoba R2N 3Y4 254-1669 noriksweb@shaw.ca BSW, MSW (Candidate). Over 100 hours. Eight years - Child Development Clinic/Private Practice/ EAP, 22 hours mediation and 45.5 hours as co-mediator. Certificate of Internship: Comprehensive Co-Mediation and Mediation Internship Pilot Project, Sept. 2000. Custody/access, parent/teen. MIRSW, MASW, FMC, FMM. Available on Request. 1
2 Anne Bolton Arbitration & Mediation Services 25 Harvard Avenue Winnipeg Manitoba R3M OJ6 452-8433 leanne@mb.sympatico.ca BA, LL.B, LL.M. FMC, Mediation Services. Private practice since 1996. Mediation, negotiation and arbitration as government lawyer and master since 1980. Chartered Arbitrator (Arbitration and Mediation Institute). FMC Certifying Assessor. Certified Comprehensive Family Mediator, 1998. Family (separation & divorce), issues with aging parents, civil, estates LSM, FMC, FMM, A & M I of M. Available on Request. 1
From the above code, if I print out the $num variable, I get the correct number, but from the print statement within the loop, nothing is output.
Thanks
Eric