Re: best way to include html?

From: Date: Thu, 19 Apr 2001 13:59:34 +0000
Subject: Re: best way to include html?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49369@lists.php.net to get a copy of this message
Easiest way I've possibly found is to shove it inside of a function which will echo it out, but with all the variables in their proper place. When I want to display something I just use: $front_page .= 'Text goes here'; In the function outout_html() I just put $front_page wherever I want it to be displayed (in the main table). If I'd like to change the format a page is displayed in I can just adjust the function or make a new one entirely, and I can avoid making a call to string replacement functions. Seems to work pretty well. I stick the declaration in a global file that all my scripts use to keep things simple. I haven't used a tag other than <p>, </p>, and <br> in weeks. -- Plutarck Should be working on something... ...but forgot what it was. ""Duke"" <kidlinux@rocketbox.dhs.org> wrote in message news:002301c0c87d$9f1e3c80$0201a8c0@atomic.rocketbox.dhs.org... > I'm setting up an html "shell" for my webpage that I include with my php > code so I don't have to see html crap and whatnot. > I'm wondering what the best way is to insert the html "shell" into my code? > Should I just echo the file, should I include(), require(), include_once(), > or require_once()?? > One section of the shell, which is in a separate file, is an html form - > would that change the way I include that particular section of html? > Thanks. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#49369) next »