Jump to content

Need help!!!


siddscool19

Recommended Posts

But when I look in html page source the characters are in separate lines ?

 

And also what encoding does PHP uses while sending data from it

Say i builted a form in php file and send data using it it uses different encoding where if i send from a HTML form it uses different encoding

Link to comment
https://forums.phpfreaks.com/topic/128922-need-help/#findComment-668420
Share on other sites

Oh, that may be because you're probably testing your script on windows, or you're hosting your test server on windows.

 

I forgot which is which, but if i remember correctly:

 

on windows linebreaks are \r\n

on linux it's \n

on mac it's \r

 

I'm guessing you're on windows, so try doing this instead:

 

$newdata = str_replace("\r\n", '-', $data);

Link to comment
https://forums.phpfreaks.com/topic/128922-need-help/#findComment-668422
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.