Differences

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

Link to this comparison view

Both sides previous revision Previous revision
php_cli_ex [2011-10-24 13:44]
Joakim Forsgren
php_cli_ex [2012-01-19 08:22]
Joakim Forsgren
Line 37: Line 37:
 echo "\n"; echo "\n";
 // För att läsa in en sträng utan radbrytning på slutet // För att läsa in en sträng utan radbrytning på slutet
-$str = substr(fgets($handle),0,-1);+$str = trim(fgets($handle));
 echo $str; echo $str;
 </code> </code>