| 1. |
Solve : PHP does not replace \n's? |
|
Answer» $stuff = file_get_contents($a); I never knew \r was a javascript newline character. PHP character? I think...But it works in javascript.. Ok, just forget about this. lets say it's both :O*sigh* In Windows/DOS world, newlines are traditionally composed of a character return "character" (ASCII 13) followed by a line feed "character" (ASCII 10). In Unix/Linux/Mac, a newline is traditionally composed of just a line feed. This is therefore OPERATING system dependent, not programming LANGUAGE dependent.Thank you. and to further confuse things, Mac OS 9 and earlier I believe use just a carriage return!So for that I'd do this? $? = str_replace(" ", "", $?); No, the example I gave you before covers all eventualities. |
|