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

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.