if (!is_array($content)) $content = array($content);
$tags = array();
+
foreach ($content as $c) {
+
+ # Add missing href from content
+ if ($tag == 'a' and !preg_match('//',$attrs)) $attrs = trim($attrs.' href="'.$c.'"');
+
$tags[] = ''
. '<' . $tag
. ($attrs ? " $attrs" : "")
. $c
. "</$tag>"
;
+
}
return join(NB_EOL,$tags);
return ''
*/
function begin() {
- if ($this->php_cli() or $this->p('txt_errors')) ini_set('html_errors', false);
$this->headers();
if (preg_match('/html$/',$this->content_type)) {