From: Loyd G. <lo...@bl...> - 2002-11-20 01:38:11
|
Thanks, that worked nicely. Is the html object part of PHP now, or is it = part of PEAR? Where can I find more? Thanks, Loyd On Tue, 19 Nov 2002 00:41:39 -0500, Carsten Klapp <car...@us...> wrote: >Hi Loyd, > >Yes the HelloWorld plugin comments are a little vague and out of date,=20 >the returned value should now use the HTML class functions not raw=20 >strings. Try something like this: > > $MOTD =3D "One moon shows in every pool;\nIn every pool, the one=20 >moon."; > $MOTD =3D explode("\n", htmlentities($MOTD)); // make an array to=20 >walk through later > > $html =3D HTML(); // new HTML object > foreach ($MOTD as $line) > $html->pushContent($line, HTML::br()); // add each line to the=20 >html object > > $html->unshiftContent(HTML::h2(_("Message of the Day"))); > > return $html; > >Carsten --=20 "Why, you can even hear yourself think." --Hobbes "This is making me nervous. Let's go in." --Calvin lo...@bl... ICQ#504581 http://www.blackrobes.net/ |