I get data from a textarea where a user has to enter a name one on each line. That data later gets split at the carriage return. Sometimes a user may add blank lines intentionally. How can I detect these lines and delete them? I'm using PHP. I dont mind using a regexp or anything else.
Incorrect Data
Matthew
Mark
Luke
John
James
Correct Data (Note blank lines removed)
Matthew
Mark
Luke
John
James