All pastes #632780 Raw Edit

Miscellany

public text v1 · immutable
#632780 ·published 2007-07-25 04:46 UTC
rendered paste body
			if ( count($panels) > 0):
				foreach( $panels as $values ):
					$value = $values->description;
					$key = $values->id;
					
					echo '<div id="'.$value.'Container" class="panels">
							<h3>'.preg_replace('/([A-Z])/',' $1',$value).'</h3>
							<div class="panels-container">
								<div style="background: url(/assetw/img/panels/'.strtolower($value).'_faded.jpg);">
									<div class="controls" id="'.$value.'Controls">&nbsp;</div>
								</div>
							</div>
						</div>';
					
					if ( is_array($options) ):	
						foreach ( $options as $option ):
							if ( $key == $option->optionid ):
								$newarray[$option->sortindex-1] = array('id' => $option->optionid, 'name' => $value);
							endif;
						endforeach;
					else:
						if ( isset( $options ) ):
							if ( $key == $options->optionid ):
								$newarray[$options->sortindex-1] = array('id' => $options->optionid, 'name' => $value);
							endif;
						else:
							$newarray = null;
						endif;
					endif;
						
				endforeach;
			endif;