/ Published in: PHP
Expand |
Embed | Plain Text
/** * Generate HTML Tag * * @param string tag * @param string content * @param array tag attributes - array('class' => 'active') * @return string compiled HTML tag */ $str = '<' . $tag; foreach ($atts as $att => $value) { $str .= ' ' . $att . '="' . $value . '"'; } $str .= '>' . $content . '</' . $tag . '>'; return $str; }
You need to login to post a comment.
