Reply to Message

html.php
Verbatim
?php

// string font_tag ([int size [, string typeface [, array attributes]]])

// This function returns an HTML $face));
$output = " ";
return $output;
}

// string anchor_tag ([string href [, string text [, array attributes]]])

// This function returns an HTML anchor tag ( $href));
$output = " $text ";
return $output;
}

// string image_tag ([string src [,array attributes]])

// This function returns an HTML image tag ( $src));
$output = " ";
return $output;
}

// string subtitle ([string text of subtitle])

// This function returns an HTML tag. It is used for the titles
// of secondary areas within pages in our examples. The reason to
// display these via a function, rather than just literal tags,
// is to enable you to change the format of these subtitles in one
// place, instead of in each script.

function subtitle($what="")
{
return " $what \n";
}

// string paragraph ([array attributes [, mixed ...]])

// This function will return a string inside HTML paragraph ( ) tags.
// Attributes for the tag may be supplied in the first argument.
// Any additional arguments will be included inside the opening and
// closing tags, separated by newlines.

function paragraph ($atts="")
{
$output = " \n";
$args = func_num_args();
while ($i $args)
{
$x = func_get_arg($i);
$output .= $x."\n";
$i++;
}
$output .= " \n";
return $output;
}

// string ul_list ([mixed values])

// This function returns an HTML unordered (bulleted) list ( tags).
// If the argument is an array, then each value from the array will be
// included as a list item ( ) in the list. Otherwise, the
// argument will simply be included inside the tags as is.

function ul_list ($values="")
{
$output .= " \n";
if (is_array($values))
{
while (list(,$value) = each($values))
{
$output .= " $value\n";
}
}
else
{
$output .= $values;
}
$output .= "
Posted by Jaqui
6th Apr 2005