Skip to content

Instantly share code, notes, and snippets.

@vinzdef
Last active August 29, 2015 14:10
Show Gist options
  • Save vinzdef/24f4c8bd0e89cdcceb75 to your computer and use it in GitHub Desktop.
Save vinzdef/24f4c8bd0e89cdcceb75 to your computer and use it in GitHub Desktop.
make table row
function makeRow($td1, $td2) {
//Create Row
$ret = "<tr>";
//Loop trough functrion arguments
$index = 0;
//Stop when get_arg() evaluates to false
while (@$r = func_get_arg($index++)) {
//Add each argument as td
$ret .= "<td>$r</td>";
}
//Return closed row
return $ret."</tr>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment