first commit
This commit is contained in:
33
application/helpers/MY_html.php
Normal file
33
application/helpers/MY_html.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class html extends html_Core {
|
||||
|
||||
public static function span_class($text, $class = false)
|
||||
{
|
||||
$html = '<span';
|
||||
$html .= $class ? ' class="'.$class.'">' : '>';
|
||||
$html .= $text;
|
||||
$html .= '</span>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
public static function span_box($text)
|
||||
{
|
||||
$html = '<span class="before"> </span>';
|
||||
$html .= $text;
|
||||
$html .= '<span class="after"> </span>';
|
||||
return $html;
|
||||
}
|
||||
public static function tag($name, $content, $attributes = false)
|
||||
{
|
||||
$html = '<'. $name;
|
||||
if($attributes)
|
||||
{
|
||||
$html .= $attributes;
|
||||
}
|
||||
$html .= '>';
|
||||
$html .= $content;
|
||||
$html .= '</'.$name.'>';
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user