Location: PHPKode > scripts > HTML Tag Maker > html-tag-maker/HTMLTagMakerClass.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

	<title>HTML Tag Maker Documentation</title>
	<style type="text/css">
	.term  {
     	vertical-align : top;
     	font-weight : bold;
     .retval  {
     	font-style : italic;

<h1>HTML Tag Maker Class</h1>

	Class HtmlTagMaker by Karsten J. Mikkelsen (hide@address.com)<br>
	Version 1.1, August 2002<br>
	A class for formatting tags<br>

<span class="term">HtmlTagMaker($tagType[, $tagAttributes=array()], [$hasEndTag=true])</span>
		<td class="term">$tagType</td>
			A valid HTML tag name, not including the tag codes &lt; &gt;, e.g. "TABLE" or "tr".
		<td class="term">$tagAttributes</td>
			An associative array of attributes for this tag. 
			No syntax checking is involved, so the attributes must be valid in order to work and will be ignored by browsers otherwise.
			The parameter is optional. The tag will have no attributes if $tagAttributes is not supplied.<br>
			To insert one or more keywords rather than key/value pairs (e.g. selected in an option tag), include an empty string for index
			E.g. array("ID" => "myTagID", "Name" => "myTagName", "" => "keyword_1 keyword_2").
		<td class="term">$hasEndTag</td>
			An optional boolean value to indicate whether there should be a closing tag.
			The default is true, so it is only necessary to pass $hasEndTag when false, e.g. if no closing tag should be used for &lt;p&gt;.

<span class="term">setAttributes(<span class="retval">array</span> $tagAttributes)</span>
<p>Change or add tag attributes, see the constructor.</p>

<span class="term">$tagAttributes</span> is an associative array such as in the HtmlTagMaker constructor.

<span class="term">setSingleQuotes()</span>
<p>Use single quotes for attributes rather than double quotes (the default).</p>

<span class="term">setDoubleQuotes()</span>
<p>Reverse a previous call to setSingleQuotes().</p>

<span class="retval">String</span> <span class="term">getStartTag()</span>
<p>Return the opening tag with all attributes</p>

<span class="retval">String</span> <span class="term">getEndTag()</span>
<p>Return the closing tag</p>

<span class="retval">String</span> <span class="term">getTag($contents)</span>
<p>Return $contents enclosed within tags</p>

Return current item: HTML Tag Maker