PEAR logo

HTML_CSS : The Definitive Guide

Name

HTML_CSS::setStyle — Set or add a CSS definition

Synopsis

    require_once 'HTML/CSS.php';
   
void|PEAR_Error HTML_CSS::setStyle( $element,  
  $property,  
  $value,  
  $duplicates = NULL);  
string   $element;
string   $property;
string   $value;
bool   $duplicates = NULL;

Description

Add or change a single value for an element property

Parameter

string $element

Element (or class) to be defined

string $property

Property defined

string $value

Value assigned

boolean $duplicates

(optional) Allow or disallow duplicates.

See

see HTML_CSS::getStyle

Throws

throws HTML_CSS_ERROR_INVALID_INPUT

Since

since version 0.2.0 (2003-07-31)

Note

This function can not be called statically.

HTML_CSS : The Definitive Guide v 1.5.0 : January 15, 2008