Re: Mangled Code Mess
- From: "Curtis" <dyer85@xxxxxxxxx>
- Date: 14 Dec 2006 01:56:32 -0800
should be fine by storing the JS in its own file, which is usually the
case. Usually, it's best to keep the presentation tier separate from
the business logic anyway.
to generate the functions on the fly like this? I assume I can just
statically define them in a .js file instead of creating them on the
fly every time my php code is called. The assumption being I replace
the function definitions with function calls in the php-generated HTML.
Here's the PHP manual's page on heredoc syntax:
On Dec 11, 7:19 am, bill <nob...@xxxxxxxxxxx> wrote:
see end of post:
Double Echo wrote:
This is old-style dirty PHP programming. There are a lot of stupidfor a newbie, who likes your style, please reference or explain
who mingle/mangle code like this trying to be cute. Instead of some HTML
with PHP thrown in, reverse it. Have PHP with HTML thrown in. PHP
should be the control, HTML should not be.
$var = 1 + 1 ;
$some_more_php = 2 + 2 ;
A lot of web servers won't be set up for HTML-with-PHP but if you have
a web server with PHP enabled, you can always throw in HTML. Programmers
who mix PHP into HTML just don't know how to program cleanly.
That sure will make writing html with embedded PHP variables a
LOT more straightforward !