Page 1 of 1

Writting php page - my writting style.

Posted: Thu Jun 18, 2009 2:37 pm
by snarkiest
Hi check this. That is one of my site pages. So I would like to hear about the code writing style. How it should be written?

I ask it because now when I found a need of javascript I don't know how to include it because the whole page is unbroken <?PHP ?> code. Please help me out with the way I'm writing. How should I write the code so I can include javascript?

Re: Writting php page - my writting style.

Posted: Thu Jun 18, 2009 3:38 pm
by McInfo
Writing Javascript with PHP is no different than writing HTML with PHP. You can either echo strings from PHP as you are doing now or drop out of "parse" mode into "direct output" mode.

PHP Manual: Escaping from HTML

Edit: This post was recovered from search engine cache.

Re: Writting php page - my writting style.

Posted: Thu Jun 18, 2009 4:10 pm
by snarkiest
Jep, I just found it too! Thank you anyway.