Jump to content

I need to put this while loop inside my variable


Monkuar

Recommended Posts

i have a variable called

 

$cake

 

it needs to have this loop inside it so I can call it out

 

 while( $r = $DB->fetch_row() ){





		   if ( $r['last_activity'] > (time() - 900) )
$r['status'] = "<span style=float:right;><span class=desc4><b>Online</b></span></span>";
		else
$r['status'] = "<span style=float:right;><span class=desc4>Offline</span></span>";
		   $column++;
		   if ($ibforums->member['settings']['2'] or (!$ibforums->member['id'])){
		   $color  = "{$r['color']}";
$colors = explode(",", $color);
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ){
    {
$r['color'] = ($r['color']) ? "style=\"padding:1px 1px 1px 2px;color:#{$colors[0]};filter:Glow(color=#{$colors[1]},strength=3)\"":"";
    }
}else{
$r['color'] = ($r['color']) ? "style=\"color:#{$colors[0]};text-shadow:#{$colors[1]} 2px 1px 1px\"":"";
}
}
$test = explode(";", $info['pdata']);
$r['avatar'] = ($r['avatar']) ? "<img src={$r['avatar']} width=64 height=64>" : "";
		   $r['star'] = ($r['star']) ? "<img class=top3 src=style_images/1/icons/{$r['star']}.png>":"";
		   
$r['name'] = "<a href=?i={$r['friendid']}>{$r['name']}{$r['star']}</a>";


	  $this->to_print .= <<< LOL
<dl class="LOL LEFT flm" style="margin-right:5px"><dt2>{$r['name']}</dt2><dd class=padding4>{$r['avatar']}<div class="RIGHT">{$r['status']}</div></dd></dl>
LOL;
	   }

 

I tried:

 

$cake = ' while( $r = $DB->fetch_row() ){





		   if ( $r['last_activity'] > (time() - 900) )
$r['status'] = "<span style=float:right;><span class=desc4><b>Online</b></span></span>";
		else
$r['status'] = "<span style=float:right;><span class=desc4>Offline</span></span>";
		   $column++;
		   if ($ibforums->member['settings']['2'] or (!$ibforums->member['id'])){
		   $color  = "{$r['color']}";
$colors = explode(",", $color);
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ){
    {
$r['color'] = ($r['color']) ? "style=\"padding:1px 1px 1px 2px;color:#{$colors[0]};filter:Glow(color=#{$colors[1]},strength=3)\"":"";
    }
}else{
$r['color'] = ($r['color']) ? "style=\"color:#{$colors[0]};text-shadow:#{$colors[1]} 2px 1px 1px\"":"";
}
}
$test = explode(";", $info['pdata']);
$r['avatar'] = ($r['avatar']) ? "<img src={$r['avatar']} width=64 height=64>" : "";
		   $r['star'] = ($r['star']) ? "<img class=top3 src=style_images/1/icons/{$r['star']}.png>":"";
		   
$r['name'] = "<a href=?i={$r['friendid']}>{$r['name']}{$r['star']}</a>";


	  $this->to_print .= <<< LOL
<dl class="LOL LEFT flm" style="margin-right:5px"><dt2>{$r['name']}</dt2><dd class=padding4>{$r['avatar']}<div class="RIGHT">{$r['status']}</div></dd></dl>
LOL;
	   }';

 

but not working

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.