staym wrote:
> 
> 4. can i work with php as html. On the other word, can
> i write php code by using Notepad and save it as
> filename.php and run it form the browser.

Yes.  That's the beauty of the language if you ask me.  That's the *only* way I
write my web pages.  I *never* use an HTML editor for anything.

With nothing but a text editor, I've even developed my own custom PHP function
library which mimics real HTML so that I don't have to write in HTML at all if I
don't want to.

For example, the following PHP code:

OpenTable(border(5).cellspacing(5).cellpadding(10));
 OpenTR();
  OpenTD(bgcolor(blue));
   echo("Insert table data here.");
  CloseTD();
 CloseTR();
CloseTable();

produces the following HTML output:

<table border=5 cellspacing=5 cellpadding=10>
 <tr>
  <td bgcolor=blue>Insert table data here.</td>
 </tr>
<table>

This approach makes it easy for me to insert PHP programming logic anywhere I want
in a script because my scripts are 100% PHP code instead of a constantly
alternating mix of HTML and blocks of PHP code.

When I first started using PHP, I loved how I was able to mix it with my HTML but
once I started writing a lot of really complex scripts, I found it increasingly
difficult to deal with PHP and HTML mixed.  My function library solved all of that
and now I crank out pure PHP webpages all the time.

I've even begun to add JavaScript capabilities to the library.  That's a big plus
for me because I hate JavaScript's anal syntax requirements.  Such a PHP library
eliminates most of that hassle and enhances my productivity.

Myke


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to