newtoall Posted May 22, 2007 Share Posted May 22, 2007 Please help!! I have a querry that returns a number of values the following code cats them together: while ($obj = $result->fetch_object()) { $desc = $desc.$obj->pdesc.chr(13); } unfortunatly the chr(13) does not produces a line break between values as I expected. So........ how can this bit of code be changed to include a line break?? Link to comment https://forums.phpfreaks.com/topic/52563-solved-carriage-return-in-php/ Share on other sites More sharing options...
Wuhtzu Posted May 22, 2007 Share Posted May 22, 2007 Accept my apology if this is way more advanced than I think. Cant you just add do something like: $desc = $desc.$obj->pdesc.chr(13)."\n"; or $desc = $desc.$obj->pdesc.chr(13)."<br>"; ? Link to comment https://forums.phpfreaks.com/topic/52563-solved-carriage-return-in-php/#findComment-259337 Share on other sites More sharing options...
newtoall Posted May 22, 2007 Author Share Posted May 22, 2007 yes $desc = $desc.$obj->pdesc.chr(13)."<br>"; worked just fine - cheers. Link to comment https://forums.phpfreaks.com/topic/52563-solved-carriage-return-in-php/#findComment-259340 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.