NewComer Code
| From: | Rocco CAstoro | Date: | Fri, 14 Nov 2003 19:02:01 +0000 |
| Subject: | NewComer Code | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-22100@lists.php.net to get a copy of this message | ||
Would this be the best and most efficent way to create a function that
accepts four string variables and returns a string that contains an HTML
table element, enclosing each of the variables in its own cell :
<?php
function table4Strings( $string1, $string2, $string3, $string4 )
{
print "<table border=1>";
print "<tr>";
print "<td>$string1</td>";
print "<td>$string2</td>";
print "<td>$string3</td>";
print "<td>$string4</td>";
print "</tr>";
print "</table>";
}
table4Strings(1, 2, 3, 4);
?>
Thanks much, reading Sams teach yourself PHP4 in 24 Hours.. Pretty
informative..