Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fgets Testing for a new line??

Status
Not open for further replies.

Elliott3

Programmer
Sep 5, 2002
347
0
0
CA
I am having a problem testing there is a new line encountered... I have $buffer = fgets($fp, 2048); I would ike to test $buffer to see if it is just a new line?? I have tried \n and \r and "" I am sure I am doing something silly here... any ideas?

CES
 
Finally figured a way to do it.

if(trim($buffer) == "")
echo "blank line";

CES
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top