Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
jfprog_06 [2012-11-13 12:46]
Joakim Forsgren created
jfprog_06 [2013-01-21 12:45]
Joakim Forsgren
Line 1: Line 1:
 +====== Genomgång läsa och skriva till/från textfiler ======
 +
 +Tutorial:\\
 +[[http://www.youtube.com/watch?v=19mlI-F2xrY|Läsa från och skriva till textfiler]]\\
 +[[http://www.youtube.com/watch?v=Rq7G5FtrsC0|Explode och implode]]\\
 +
 +
 <code php> <code php>
 <?php <?php
Line 16: Line 23:
  
 // läser in en fil till en array, radbrytning ger ny "post" // läser in en fil till en array, radbrytning ger ny "post"
-$arr = file('name');+//$arr = file('name'); 
 +// Man vill för det mesta inte ha med radbrytningen 
 +$arr = file('name',FILE_IGNORE_NEW_LINES);
 //print_r($arr); //print_r($arr);