I have to read a full line from stdin. When I use fscanf
it reads only string before a space. I need to read a whole line inluding spaces. Any ideas how can I achieve this?
Try
$line = fgets();
The PHP manual says:
Description
string fgets ( resource $handle [, int $length ] )
Gets a line from file pointer.