Code: Select all
<?php
function border($top, $right, $bottom, $left, $style, $col)
{
if($style==""){$style="solid";}
echo "style="
border-style: ".$style.";
border-color: #".$col.";
border-top-width: ".$top."px;
border-right-width: ".$right."px;
border-bottom-width: ".$bottom."px;
border-left-width: ".$left."px;
"";
}#################### EOF
?>Code: Select all
<?php
print"
<td ";$Lib -> border(0,0,2,0,'',$color); print">some text</td>";
?>The reason I have to do that is because I'm echoing in the function.
I'd really like to be able to do something like:
Code: Select all
<?php
print"
<td ".$Lib -> border(0,0,2,0,'',$color).">some text</td>";
?>like:
Code: Select all
<?php
print"
<td>".mysql_num_rows($sql)."</td>";
?>Is there some way I can return that information without echoing/printing it?
And would that solve my problem or is there something else I need to do?
Thanks for any help.
--pb