This is the string-returning form of tables.php. It can work together with htmlstr.php, liststr.php, and formstr.php. It can be included with any/all related files, but remember that if included along with tables.php, the function names that return strings are postfixed with a "_str". See example code for details.
Download
View Source (print view)
Rating : 4.7
Views : 498
<?
/* tablestr.php
*
* functions to create html tables
*
* Refer HTML questions to http://www.w3.org/TR/REC-html40/
*
* Returns strings instead of printing output. Contains no formatting.
*/
if(defined("USING_TABLES")) {
function table_str($border=0, $width="", $spacing="", $padding="", $args="") {
$temp = "<TABLE border=$border";
if($width != "")
$temp .= " width="$width"";
if($spacing != "")
$temp .= " cellspacing=$spacing";
if($padding != "")
$temp .= " cellpadding=$padding";
if($args != "")
$temp .= " $args";
$temp .= ">";
return($temp);
}
function tr_str($args="") {
$temp = "<TR";
if($args != "")
$temp .= " $args";
$temp .= ">";
return($temp);
/* possible tr $args: id, class, lang, title, style, align, char, charoff, valign, intrinsic events */
}
function td_str($args="") {
$temp = "<TD";
if($args != "")
$temp .= " $args";
$temp .= ">";
return($temp);
/* possible $args: id, class, lang, title, style, bgcolor, align, char, charoff, valign, rowspan, colspan, etc */
}
function table_close_str() {
print("</TABLE>");
}
} else {
function table($border=0, $width="", $spacing="", $padding="", $args="") {
$temp = "<TABLE border=$border";
if($width != "")
$temp .= " width="$width"";
if($spacing != "")
$temp .= " cellspacing=$spacing";
if($padding != "")
$temp .= " cellpadding=$padding";
if($args != "")
$temp .= " $args";
$temp .= ">";
return($temp);
}
function tr($args="") {
$temp = "<TR";
if($args != "")
$temp .= " $args";
$temp .= ">";
return($temp);
/* possible tr $args: id, class, lang, title, style, align, char, charoff, valign, intrinsic events */
}
function td($args="") {
$temp = "<TD";
if($args != "")
$temp .= " $args";
$temp .= ">";
return($temp);
/* possible $args: id, class, lang, title, style, bgcolor, align, char, charoff, valign, rowspan, colspan, etc */
}
function table_close() {
print("</TABLE>");
}
}
?>
security, snnap_ss, salars77, paper_without_wood, guest, enfactuation, rent a car, download, regirstration form, php_snips, fedex, call php', userstatusinonline, php_script"_class="neww"_target="_blank"_title="im_neuen, best ide, php script" class="neww" target="_b..., forum, p t test paired, php_tools, href php function, utfraw