Current location: Hot Scripts Forums » Programming Languages » PHP » Please help insert html into php


Please help insert html into php

Reply
  #1 (permalink)  
Old 03-30-05, 04:50 PM
idforforums idforforums is offline
New Member
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Please help insert html into php

Hopefully this is an easy question

I have a massive script in php. I need to insert a section of html into the php script.

I have tried to close php ?>, opem html <html> write html here, close html </html> and open php back up to contiue with the remaining script.

The html is as simply as a picture insert, or maybe a link, all easy stuff, but can't figure out how to get the html to show and work

errors i have received in the process are totally throwing off the display of the php page, such as bigger font, extra header, etc.

is there an easy tutorial anywhere?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 03-30-05, 05:00 PM
urlguy urlguy is offline
Newbie Coder
 
Join Date: Feb 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
I'd think you'd just need to close the php with ?> then do html without the <html> tags, you could also try rename the php to html while working on it and open it using something like FrontPage.

Im not all sure bout this as im pretty newb myself, but its worth a try, hope it helps
Reply With Quote
  #3 (permalink)  
Old 03-30-05, 05:25 PM
idforforums idforforums is offline
New Member
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks, that didn't work, I got the same results.
Reply With Quote
  #4 (permalink)  
Old 03-31-05, 12:39 AM
filth filth is offline
Newbie Coder
 
Join Date: Mar 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
if you are receiving header errors then the chances are you are trying to insert it incorrectly. the only way we can really help is by posting the relevant code.
Reply With Quote
  #5 (permalink)  
Old 04-01-05, 08:13 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

<?php

//code here
?>
<table align="center">
blah
</table>
<?php
//more code here
?>
That will work! Or you can use:

PHP Code:

<?php

//code here

echo '<table align="center">
blah
</table>'
;

//more code here
?>
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #6 (permalink)  
Old 04-06-05, 11:29 PM
idforforums idforforums is offline
New Member
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
That should do it, sorry for not getting back sooner. Appreciate it!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Auto Dealer Script nuzzle PHP 17 04-14-10 08:34 PM
PHP in HTML Pages? ZeoFateX PHP 19 01-04-06 06:42 PM
Putting PHP into a HTML page? PigeonHead HTML/XHTML/XML 5 01-24-05 02:22 PM
Can PHP place quotes around HTML attributes frdmsun PHP 1 08-17-04 02:12 AM
Can anyone help me ? (problem using php variables in html db insert code) chronic_ PHP 2 06-13-04 11:19 AM


All times are GMT -5. The time now is 05:39 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.