src/bbn/html/element.php
public static function css_to_string($css){
    if ( \is_string($css) ){
      return ' style="'.bbn\str::escape_dquotes($css).'"';
    }
    else if ( \is_array($css) && \count($css) > 0 ){
      $st = '';
      foreach ( $css as $prop => $val ){
        $st .= $prop.':'.$val.';';
      }
      return ' style="'.bbn\str::escape_dquotes($st).'"';
    }
  }
public static function css_to_string($css){
    if ( \is_string($css) ){
      return ' style="'.bbn\str::escape_dquotes($css).'"';
    }
    else if ( \is_array($css) && \count($css) > 0 ){
      $st = '';
      foreach ( $css as $prop => $val ){
        $st .= $prop.':'.$val.';';
      }
      return ' style="'.bbn\str::escape_dquotes($st).'"';
    }
  }
public static function css_to_string ( $ css ) { if ( \ is_string ( $ css ) ) { return ' style="' . bbn \ str :: escape_dquotes ( $ css ) . '"' ; } else if ( \ is_array ( $ css ) && \ count ( $ css ) > 0 ) { $ st = '' ; foreach ( $ css as $ prop => $ val ) { $ st .= $ prop . ':' . $ val . ';' ; } return ' style="' . bbn \ str :: escape_dquotes ( $ st ) . '"' ; } }
Generates style string for a HTML tag

@param array|string $css CSS properties/values array
@return string
Generates style string for a HTML tag