For the PHP guru's... [Archive] - Glock Talk

PDA

View Full Version : For the PHP guru's...


rsagona1
11-14-2008, 17:52
No question to post. Just to say, I vow to never, ever, ever mix HTML & PHP within the same document again.



I learned (incorrectly) to echo out HTML within a php document after data processing. It got ugly. I wrote about 5k lines of code and I got angry and deleted it all.

I started over, this time..actually using some common sense. I decided to use a template engine. If you're not familiar with this, google it, there are about 50 to choose from.

It allows you to create HTML templates, store 'em away, and just use variables within the HTML document to link to the PHP data.

i.e.:

<html> <title> [php_processed_var]</title></html>

In the PHP file, I just do all my data processing and declare the variables.

<?

$php_processed_var = Hello World!
?>



My code is ALOT cleaner. And I actually feel confident about showing it off.

Fire_Medic
11-14-2008, 18:00
post deleted my error.


oh it was in general glocking lol, I thought I was going nuts. Glad you got your codes all figured out.:supergrin:

rsagona1
11-14-2008, 18:01
:dunno: Why's this in general Glocking? :dunno:
:wow:Oops!