The code below are working, but! when the sample text file was edited in other version of text editor.. it wont!!
What is the very best way to read text line by line without the text editor issue using php??
sample text file name - john (line 0) age - 24 (line 1) gender - male (line 2) message - "the message" (line 3)
code
$result = "";
$lines = file('sample.txt');
$name= $lines[0];
$age= $lines[1];
$gender= $lines[2];
$message = $lines[3];
echo $mail_to;
echo $port_num;
echo $phone_num;
echo $message;
i want to put each line in a variable for a reason... on my notepad++ View->Show Symbol->Show All Charactes each line appeared "CR LF"... but when the other user edited the text file; all line change into "CR" only....
Can PHP handle this issue???