Text Area New Line Character

Hi !

I have a text area, on a form. And we have different users with different computers.

That text area will have some numbers on each line. Let say, phone numbers 1 per line.

When the form is submitted I want to convert that text area value from string to array. I know I can do explode("
“,$arr) but my question is that, since there are different computers, OS, i.e. MAC, PC, is explode(”
",$arr) OK for all of them ? Or they have a different new line character ?

Can you please guide me what can be a UNIVERSAL function that will convert text area’s value to an array (the separator will always be new line)

Please help !
ZH

Hello,

well, i use this to prepare text for insert to database

$string = str_replace(array(“\r”, "\r
", "
"), "\
", $string);

hope it help you.