Jump to content

For each and html output


wiggst3r

Recommended Posts

Hi

 

I'm trying to create a drag and drop functionality to a page.

 

I'm using a foreach loop to loop through records of a database and output them.

 

I have a problem though with the output on the page.

 

As I'm pulling records from 6 columns, all the inofmration within the output is all squashed together.

 

for example

 

AAThis is a test messageFridayExample1

 

I want each of the column results to be nicely separated.

 

My code is as follows for the foreach loop:

 

<div id="listContainer">
<?
foreach($list as $item) {
	?>

	<div id="item_<?=$item['catid'];?>"><?=$item['briefed'];?><?=$item['category'];?><?=$item['needed'];?><?=$item['status'];?><?=$item['orderid'];?></div>

	<?
}
?>

</div>

 

Any ideas how I can separate these results (without using html spaces) for example

 

Thanks

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.