[nycphp-talk] <script language="php">

Jon Baer jonbaer at
Thu Feb 6 17:06:59 EST 2003

> Wow, does this work?
> I've always used PHP to format output into Javascript, and included it
> in the page that way:
>     <script type='text/javascript'

See ... for my part (and opinion) Id find this kinda sloppy although it
works fine ... the main issue I have is that I have taken on some small
projects and its loaded with slop and <?php all over the place ... meanwhile
a (albeit complicated SQL statement) would have really helped, Id also find
a template approach extremely better.  So far most of my stuff is:

<script language="php">
// examine all GET, POST, SQL, fill arrays, etc //

// rest of the page

It should be a written rule/law somewhere to do all your PHP/JSP work @ the
top of the page :-)

What would be extremely nice is to be able to object off segments of the
page using the same technique.

- Jon

More information about the talk mailing list