1. Computing

Discuss in my forum

Angela Bradley

PHP with HTML

By , About.com GuideSeptember 6, 2006

Follow me on:

Did you know that you can switch between HTML and PHP within the same document? Using HTML is an important part of using PHP. While PHP may be doing the actual work, we need to use HTML to format how it is displayed. Even the most useful PHP pages would get limited visits if they were completely unformatted.
Comments
September 5, 2008 at 12:30 am
(1) jokerxXXX says:

i have been using the Echo method in my PHP code. It works well when i am using it with short phrases but the whole script stops working when i use it with a long HTML formated phrases.
[i am a PHP beginner]

January 13, 2009 at 10:24 am
(2) Moira says:

I believe you have to “echo” every new line, if your text is long, perhaps you are not doing that. If you use a new line and do not put “echo” again, it does not work

February 4, 2009 at 6:04 pm
(3) Rob says:

What about php’s compression ability which can be set in the ini file? Wouldn’t it make sense that if you are using a great deal of this intermixing to use the echo statements and set the compression to save on bandwidth? I am new to php so I may be completely off here….

February 12, 2009 at 12:25 pm
(4) jack says:

I have a password to enter a web page but what code do I use to stop re-entry once someone leaves the page? The login is in PHP but the page is HTML.

May 29, 2009 at 8:08 pm
(5) enriqeu says:

Nice Blog .
Best Regards . Enrique BEST FREELANCE JOB ever RATED!

November 12, 2010 at 2:35 pm
(6) DY says:

@ JokerXXX ; it is possible. Are you sure you have the ” and ‘ right? I haven’t experienced any limits yet.

@ Moira ; you can just use echo “firstline second line”;

@ Rob ; from your experience i suppose you don’t have an extremely busy site => just don’t bother about it

@ Jack ; that is impossible! You can’t do an authorization check using HTML (not in any normal way, that is)

February 27, 2013 at 10:46 am
(7) rudra says:

I’m using php code in HTML and opeing it using internet explorer.
but php code is not working.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2013 About.com. All rights reserved.