styles[$name] = $value; } function removeStyle($name){ unlink($this->styles[$name]); } function buildInlineStyles(){ $output = ""; foreach($this->styles as $style => $value){ $output .= "$style:$value;"; } return $output; } } function addInlineStyles($styleArray) { $inlineStyle = new InlineCSS(); $v = false; foreach($styleArray as $style => $value) { if (!empty($value)) { $v = true; $inlineStyle->addStyle($style, $value); } } if ((!empty($styleArray)) && ($v)) { return "style='".$inlineStyle->buildInlineStyles()."'"; } } ?>