Jump to content

textarea - Displaying database code?


spires

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.