Jump to content

Counting lines


NLCJ

Recommended Posts

Hello,

I'm creating a program that analyzes information that is exported by another program. That program exports it in this way:

Value1 Value2 Value3 Value4

Value1 Value2...

 

In order to insert them in the database, I first have to know how many lines are inserted. They get send through HTML post. I already tried:

$lines = explode("\n", $string);
$number_lines = count($lines);

 

But this always results in 1. How do I fix this?

 

Regards,

Chris

Link to comment
https://forums.phpfreaks.com/topic/212999-counting-lines/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.