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
https://forums.phpfreaks.com/topic/108673-for-each-and-html-output/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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