[转]类与PHP (VI)
程序员文章站
2022-04-02 17:13:56
...
Classes and PHP
Of course, you can't enter column span information with one join, but you can with extra joins. Let's say your array consists of six elements and the third and fifth elements need to span 2 and 3 columns respectively. To do this you can join the ":#" to an intermediate array:
$newarray=$arry;
$newarray[2]=join(list($newarray[2],"2"),":");
$newarray[4]=join(list($newarray[4],"3"),":");
$message=join($newarray,"|");
$Tbody->TROut($message);
Obviously, even more functionality can be added to the class. Also, the code is not idiot proof. If enough people ask, I will add more functionality (email me with your ideas), idiot proof the code and post it.
--Rod
Of course, you can't enter column span information with one join, but you can with extra joins. Let's say your array consists of six elements and the third and fifth elements need to span 2 and 3 columns respectively. To do this you can join the ":#" to an intermediate array:
$newarray=$arry;
$newarray[2]=join(list($newarray[2],"2"),":");
$newarray[4]=join(list($newarray[4],"3"),":");
$message=join($newarray,"|");
$Tbody->TROut($message);
Obviously, even more functionality can be added to the class. Also, the code is not idiot proof. If enough people ask, I will add more functionality (email me with your ideas), idiot proof the code and post it.
--Rod
上一篇: [转]类与PHP (III)