Lyleyboy Posted October 6, 2011 Share Posted October 6, 2011 Hi, I'm looking for a bit of help. I have a record in a MSSQL. I'm using PHP to pull that record. In the record there are the funky square characters for chr(13) and chr(10). In PHP they are totally ignored which means that the record appears on one line. I have tried replacing these with various a numerous characters but no joy. Things like str_replace(' ', '<br/>', $notes); and str_replace(chr(10), " ", $notes); Please help Quote Link to comment https://forums.phpfreaks.com/topic/248564-replacing-carridge-return-chars/ Share on other sites More sharing options...
Lyleyboy Posted October 6, 2011 Author Share Posted October 6, 2011 Anyone have any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/248564-replacing-carridge-return-chars/#findComment-1276603 Share on other sites More sharing options...
Andy-H Posted October 6, 2011 Share Posted October 6, 2011 Does nl2br work? Whats the character encoding? Have you tried outputting it using htmlentities with the 3rd paramater. echo htmlentities($var, ENT_NOQUOTES, 'UTF-8'); Quote Link to comment https://forums.phpfreaks.com/topic/248564-replacing-carridge-return-chars/#findComment-1276605 Share on other sites More sharing options...
Lyleyboy Posted October 7, 2011 Author Share Posted October 7, 2011 Hi, Thanks for that but I'm afraid neither worked. I'm really at a loose end. Quote Link to comment https://forums.phpfreaks.com/topic/248564-replacing-carridge-return-chars/#findComment-1276692 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.