Jump to content


Photo

dreamweaver php


  • Please log in to reply
3 replies to this topic

#1 john1234

john1234
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 February 2005 - 02:15 PM

hi

i was wondering anyone could give me any suggestion on any source of information on the successful placing of php code into dreamweaver generated html


#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 06 February 2005 - 01:42 PM

hi

i was wondering anyone could give me any suggestion on any source of information on the successful placing of php code into dreamweaver generated html

View Post


can you be a little more specific? i use dreamweaver mx 2004 at work, and i've never run into a problem... keep in mind that php is server side, so it will all be parsed before any of the html is even seen by the browser... with that in mind, it doesn't really matter technically where your php is placed, however, for readability, you may want to set some guidelines for yourself...
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 john1234

john1234
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 February 2005 - 02:13 PM

sorry i will clarify i wanted to know how to embed php in the dreamweaver mx 2004 generated code. This is because this code differs markedly from the html code which is explained in books

i would appreciate any help in this matter

#4 cx409

cx409
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 08 February 2005 - 10:46 AM

i think you mean how to get to the code:
Just above the main design screen, click "Code". To start a PHP code block, type this:
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php
[/span][span style=\"color:#FF8000\"]//and to end, type this:
[/span][span style=\"color:#0000BB\"]?>[/span]
[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

if you're talking about the colouring....hope this helps:

In Dreamweaver (inside a PHP code block):
Predefined functions are blue
Comments are orange
Text in Quotes & Numbers are red
Statements (if...else...for) & Booleans are green
Variable Names are black
Operators (+, =, -) are blue
Globals(?) and Superglobals are cyan/light blue - sry cant make the colour...

I think that's it...please correct me if im wrong, and if this isn't what you're looking for...sry.

Hope it helps. cx409
PROUD OWNER OF A CPAV ACCOUNT: cx409[br][br]View my CPAV profile[br][br]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users