spires Posted February 9, 2011 Share Posted February 9, 2011 Hi I have a text area, that I want to display info pulled from a database. I can get the data to show, But can get each entry of the table to display on it's own line. Example: ob1ob2ob3ob4ob5 Should be: ob1 ob2 ob3 ob4 ob5 CODE: <textarea id="interest" onfocus="clearInterest()" class="textareacss" style="height:212px;overflow:auto;"><?PHP $newInterestSub = Admin_interests_sub::find_by_cat_id($id); foreach($newInterestSub as $newInterestSubs){ echo $newInterestSubs->interest_sub.'\n'; } ?></textarea> Any help would be great. Link to comment https://forums.phpfreaks.com/topic/227221-textarea-displaying-database-code/ Share on other sites More sharing options...
trq Posted February 9, 2011 Share Posted February 9, 2011 echo $newInterestSubs->interest_sub."\n"; Link to comment https://forums.phpfreaks.com/topic/227221-textarea-displaying-database-code/#findComment-1172065 Share on other sites More sharing options...
spires Posted February 9, 2011 Author Share Posted February 9, 2011 Thanks. I always miss that. Link to comment https://forums.phpfreaks.com/topic/227221-textarea-displaying-database-code/#findComment-1172067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.