I am reading STDIN with fgets but problem is, that I need to read one single line even if I copy-paste content to STDIN.
imput example:
1st line
2nd line
3rd line
code:
while (FALSE !== ($line = fgets(STDIN))) {
echo $line;
}
This script will put all there 3 lines in to variable $line, but I need to put only "1st line" to $line. How to do it? sorry for my bad english