Re: cgi.php




Sandy.Pittendrigh@xxxxxxxxx wrote:
Lincoln Stein's (brother of Franken?) cgi.pm is a great tool for perl
programmers--providing a high-level API for lots of common, repeated
many times html constructs.

Is there a good php analog out there?
Wouldn't it be nice to able to say:

echo table(tr(td("somet text")));

Maybe there is such a thing, and I just don't know about it.

Sure:

function td($str) {
return "<td>$str</td>";
}
function tr($str) {
return "<tr>$str</tr>";
}
function table($str) {
return "<table>$str</table>";
}

echo table(tr(td("some text")));

.



Relevant Pages

  • Re: problem with include.
    ... function inside the IF block that was icluded in common. ... posts automatically by running PHP script. ... echo "Updating existing topic...\n"; ...
    (comp.lang.php)
  • Re: problem with include.
    ... function inside the IF block that was icluded in common. ... posts automatically by running PHP script. ... echo "Updating existing topic...\n"; ...
    (comp.lang.php)
  • Re: Possible to search ALL except filetype?
    ... Or I can narrow it down alittle bit or just put in the common .exts. ... I dump alot of images onto DVDs. ... that aren't the common picture types. ... Remove the word "echo" in the last line to activate the batch file. ...
    (microsoft.public.windowsxp.general)
  • Re: How to return user name in a script even if run by SUDO?
    ... common@common-laptop:~$ sudo echo $ ... Kapil Singh Kushwah ... _BEFORE_ executing sudo. ...
    (Ubuntu)
  • Re: If() action within print()..?
    ... >> Don't assume I didn't look for the asnwer before I posted. ... > echo 'class2'; ... >> well, gimme a break. ... common sense isn't all that common. ...
    (comp.lang.php)