[KLUG Members] PHP
Richard Harding
members@kalamazoolinux.org
Thu, 19 Feb 2004 21:29:46 -0500
Jeremy Leonard wrote:
>What would be better practice when using php for a website?
>
>To use html and php in the same document, switching back and forth like
>this.
>
>HTML
>PHP
>HTML
>PHP
>HTML
>
>Or would it be better to use all PHP in one block and in cases where you
>don't really need php just echo the html.
>
>HTML
>PHP
>HTML
>
>For example:
>
>I'm building a site with some forms... duh.
>
>Anyway...
>
>Some of the form information is from a mysql database. I populate some
>dropdown boxes with this data.
>Should I bounce in and out of php to build this form or just do it all in
>php?
>
>Jeremy Leonard
>
>
>_______________________________________________
>Members mailing list
>Members@kalamazoolinux.org
>
>
>
I was told that due to the server taking cycles to jump in and our of
PHP code that it is more efficient to do large blocks all in PHP to
prevent jumping in and out.
I have never tested it on a large enough file to matter though.
Rick