Need a simple PHP code to allow for rows and colums

Looking for volunteers to join your project? Need help with a script but can't afford to pay? Want to offer your services as a volunteer to build up your portfolio? This is the place for you...

Moderator: General Moderators

Post Reply
Forum Newbie
Posts: 3
Joined: Wed Mar 30, 2011 11:05 am

Need a simple PHP code to allow for rows and colums

Post by drumguru69 »

I have a Joomla based module, which shows a list of featured ads in a single column. I would like to show two rows of ads, each row consisting of four ads... I have tried to copy and paste some example php, which did not work. I was hoping someone could fill in the appropriate pieces to make the module function the way I need it to... If this is not enough information... or if more files will need to be modified to make the whole system work, then please let me know.. (I am a newbie)

Code: Select all

 * @author Sanjeev Shrestha
 * Default Template for Featured
defined('_JEXEC') or die('Restricted access');


		<?php if(count($lists)>0) {?>
			<table border="0" cellpadding="2">
			<?php foreach($lists as $l){
				$img_src = "";
					$img_src = $baseurl."/".$l->userid."/".$l->image."_sthm.jpg";
					$img_src = $baseurl."/".$l->userid."/".$l->image."_thm.jpg";
					$img_src = $xurl."/noimage_sthm.jpg";
				<td><a href="<?php echo $linkx; ?>"><img src="<?php echo $img_src;?>" /></a></td>
				<td valign="top"><a href="<?php echo $linkx; ?>"><strong><?php echo $l->title; ?> </strong></a>
				<?php if($l->price>0){?> 
					<div class="price">
						<?php echo $l->currencysymbol; ?> <?php echo number_format($l->price,2); ?> <?php echo $l->currency; ?>
			<?php }?>
					echo JText::_('NO_ADS');


[ /syntax]
Post Reply