紅茶小館

一杯紅茶喜相逢 Share Web Tech and Life …

PHP parse CSV

用 PHP 內置  function filegetcsv 去 parse CSV file, 常有 big5, utf8 亂碼問題。
最後還是用原始方法, 逐行 read, 再用 explode 變成2d array. 才解決到問題。

$dataArr = file(data.txt);
  for ($i=0;$i<count($dataArr);$i++){
     $line = explode("~", $dataArr[$i]);
     foreach($line as $value) {
        $finalData[$i][] = $value;
    }
}

37 Responses

  1. nike air max pas cher Says:

    nike air max pas cher…

    Photographs are one of the many unnoticed areas of a web site. Intercontinental entire WEB OPTIMIZATION section of the idea and imagine the shutter, this is why we are these kinds of. Now consider how the lions are blind too and also are unable to go t…

  2. Twitter tweets count Says:

    Twitter tweets count…

    ygvhdyouo wmejf webfqbi wewy bqcqdkuqvcjhcck…

  3. UK Chat Rooms Says:

    … [Trackback] …

    [...] Read More here|Read More|Find More Informations here|There you will find 98792 more Informations|Informations on that Topic: redteaclub.com/blog/?p=7 [...] …

  4. i was reading this Says:

    … [Trackback] …

    [...] Read More on|Read More|Read More Informations here|There you will find 21914 additional Informations|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  5. myvanilla Says:

    … [Trackback] …

    [...] Read More on|Read More|Find More Infos here|There you can find 43998 more Infos|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  6. horse back riding Says:

    … [Trackback] …

    [...] Read More on|Read More|Find More Infos here|Here you will find 2559 more Infos|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  7. PK Studies in rats Says:

    … [Trackback] …

    [...] Read More here|Read More|Find More Infos here|There you will find 3265 more Infos|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  8. hash bcrypt online Says:

    … [Trackback] …

    [...] Read More on|Read More|Read More Informations here|Here you will find 16738 more Informations|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  9. lequipe auto Says:

    … [Trackback] …

    [...] Read More on|Read More|Read More Informations here|There you will find 88716 additional Informations|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  10. home workout equipment Says:

    … [Trackback] …

    [...] Find More here|Find More|Read More Infos here|There you will find 66649 more Infos|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  11. Bulk PK studies Says:

    … [Trackback] …

    [...] Find More here|Find More|Find More Informations here|Here you will find 43776 additional Informations|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  12. Teen Chat Says:

    … [Trackback] …

    [...] Find More on|Find More|Find More Informations here|There you can find 54212 additional Informations|Informations on that Topic: redteaclub.com/blog/?p=7 [...] …

  13. Skrota bil utan motor Says:

    … [Trackback] …

    [...] Read More here|Read More|Find More Informations here|Here you can find 25475 additional Informations|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  14. paypal hosting Says:

    … [Trackback] …

    [...] Read More here|Read More|Read More Infos here|There you can find 43396 more Infos|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  15. Microsoft Windows Says:

    … [Trackback] …

    [...] Read More here|Read More|Read More Infos here|Here you will find 40415 additional Infos|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  16. discover this Says:

    … [Trackback] …

    [...] Find More here|Find More|Read More Infos here|There you will find 25108 additional Infos|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  17. search Says:

    … [Trackback] …

    [...] Find More here|Find More|Read More Informations here|There you can find 45634 more Informations|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  18. http://kuantoes.com/annonces-voiture/ Says:

    … [Trackback] …

    [...] Read More here|Read More|Find More Infos here|Here you can find 72587 more Infos|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  19. Easy Retired Millionaire Review – easyretiredmillionaire.com Says:

    … [Trackback] …

    [...] Read More on|Read More|Find More Informations here|Here you will find 85336 additional Informations|Informations on that Topic: redteaclub.com/blog/?p=7 [...] …

  20. men\'s accessories Says:

    … [Trackback] …

    [...] Find More on|Find More|Find More Informations here|There you can find 72488 additional Informations|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  21. International Moving Quotes Says:

    … [Trackback] …

    [...] Find More on|Find More|Read More Informations here|There you will find 84859 additional Informations|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  22. cheap double glazing Says:

    … [Trackback] …

    [...] Find More here|Find More|Read More Infos here|There you will find 31646 additional Infos|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  23. AAALAC accredited rodent vivarium facility Says:

    … [Trackback] …

    [...] Find More here|Find More|Read More Informations here|Here you will find 87710 additional Informations|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  24. Gvk Biosciences Says:

    … [Trackback] …

    [...] Find More on|Find More|Find More Informations here|There you will find 16673 more Informations|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  25. uniccshop new domain 2019 Says:

    … [Trackback] …

    [...] Find More on|Find More|Find More Informations here|There you will find 77366 additional Informations|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  26. GVK bio sciences nacharam Says:

    … [Trackback] …

    [...] Read More on|Read More|Find More Infos here|There you can find 81402 additional Infos|Informations on that Topic: redteaclub.com/blog/?p=7 [...] …

  27. pracownicy zagraniczni Says:

    … [Trackback] …

    [...] Read More here|Read More|Find More Informations here|There you will find 1947 more Informations|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  28. balkony szklane Says:

    … [Trackback] …

    [...] Read More here|Read More|Read More Infos here|There you can find 8845 additional Infos|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  29. balustrady nowoczesne Says:

    … [Trackback] …

    [...] Find More here|Find More|Find More Informations here|There you will find 25964 more Informations|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  30. GVK BIO contract research organization in india Says:

    … [Trackback] …

    [...] Find More here|Find More|Read More Infos here|Here you will find 98952 more Infos|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  31. Cheap Rare Fashion Says:

    … [Trackback] …

    [...] Read More on|Read More|Read More Informations here|There you will find 11970 additional Informations|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  32. GVK bio sciences news Says:

    … [Trackback] …

    [...] Read More on|Read More|Read More Infos here|Here you will find 91321 additional Infos|Infos on that Topic: redteaclub.com/blog/?p=7 [...] …

  33. GVK BIO News Says:

    … [Trackback] …

    [...] Read More on|Read More|Find More Infos here|There you can find 19348 additional Infos|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  34. GVK biosciences Says:

    … [Trackback] …

    [...] Find More on|Find More|Find More Infos here|Here you will find 13137 additional Infos|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  35. empresa informática Says:

    … [Trackback] …

    [...] Read More on|Read More|Find More Infos here|There you will find 29270 additional Infos|Informations to that Topic: redteaclub.com/blog/?p=7 [...] …

  36. purchase order system Says:

    … [Trackback] …

    [...] Find More on|Find More|Read More Informations here|There you will find 5677 more Informations|Infos to that Topic: redteaclub.com/blog/?p=7 [...] …

  37. website Says:

    … [Trackback] …

    [...] Find More here|Find More|Read More Infos here|Here you can find 70483 additional Infos|Informations on that Topic: redteaclub.com/blog/?p=7 [...] …

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.