Jump to content

Encode function for strings?


dappa600

Recommended Posts

I have "XML-like" result in variable $out wich I convert to viewable HTML page, using various string manipulation functions like explode(). Everything works fine when I read $out variable from txt-file using  file_get_contents("RESULT.TXT"); But that was just for testing string-manipulation phase.

 

When I get $out variable from TCP-socket, string manipulations brings unviewable HTML-page. I figured that must be some sort of formatting difference between TCP-stream and file_get_contents() because characters should be just the same.

 

So how to edit string variable from TCP-stream to right format. utf8_encode()? utf8_decode()?

Link to comment
https://forums.phpfreaks.com/topic/169578-encode-function-for-strings/
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.