html to php conversion

This is a discussion on "html to php conversion" within the PHP Forum section. This forum, and the thread "html to php conversion are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 1st, 2005, 10:19
Junior Member
Join Date: Dec 2005
Age: 29
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
html to php conversion

hi all,

i want to convert the html content into php content dynamically.

//html code
<html>
<body>how are you?</body>
</html>

the above html code should be be look like this after converting to php

//php code
<?php
$body = how are you?;
?>


i found couple of softwares for html to php conversion but that is manually i.e. each time i had to convert my html content into php but i want it dynamically.

is it possible??

thanks in advance

regards

amit
Reply With Quote

  #2 (permalink)  
Old Dec 1st, 2005, 16:54
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: html to php conversion

Do you understand what php is for?
to get what you would want to work you would have to do...
PHP: Select all

<?php
$body 
"<html><body>how are you?</body></html>";
echo 
$body;
?>
In which case you might as well just not use php... (would be "faster" to load)
PHP does not replace HTML, php adds onto it.

Last edited by Rob; Dec 1st, 2005 at 17:39.
Reply With Quote
  #3 (permalink)  
Old Dec 1st, 2005, 20:50
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: html to php conversion

If you wanting to put HTML inside PHP instead of PHP inside HTML you can do it such as:
PHP: Select all

echo '<html>';
echo 
'<head></head>'
I think you get the idea
Reply With Quote
  #4 (permalink)  
Old Dec 2nd, 2005, 00:51
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 25
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tim356
Re: html to php conversion

or if you just want to convert your .htm files to .php (so that later on you can include php content in them) you can just change the extension. It won't affect your site, so long as your server has php installed.

Then when you want to include some php to your code, just use open (and ending) tags.
Code: Select all
<?php
?>
Reply With Quote
  #5 (permalink)  
Old Dec 2nd, 2005, 05:00
Junior Member
Join Date: Dec 2005
Age: 29
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: html to php conversion

hi,

actually i'm making the rss reader and i'm able to parse the xml values to the php. But instead of xml i want to use html to php conversion sothati can load that values into the flash. Is that possible to make html to php conversion?

regards

amit
Reply With Quote
  #6 (permalink)  
Old Dec 2nd, 2005, 07:07
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: html to php conversion

Quote:
Originally Posted by amit_shetye
hi,

actually i'm making the rss reader and i'm able to parse the xml values to the php. But instead of xml i want to use html to php conversion sothati can load that values into the flash. Is that possible to make html to php conversion?

regards

amit
Oops - I've just answered a slightly different question that you asked in another thread. Didn't realise that you wanted to use Flash as well; can't really help with that as I'm not a flash expert.
Reply With Quote
  #7 (permalink)  
Old Dec 2nd, 2005, 22:17
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: html to php conversion

PHP does have functions for parsing XML
So yes, it is possible you can read about them here http://www.php.net/manual/en/ref.xml.php
Sorry if I can't be more specific in helping you, I have never used the features, but I know it can be done.
Reply With Quote
Reply

Tags
html, php, conversion

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Video Conversion Monie Webforumz Cafe 10 Aug 16th, 2007 08:29
Non-English PDF File Conversion to XML proaudience Webforumz Cafe 0 Jun 18th, 2007 20:46
Qtime conversion urbannordic Introduce Yourself 3 Oct 10th, 2006 09:30
Language Conversion jpvsd Other Programming Languages 0 Jun 15th, 2006 17:42
XML to db conversion swetha Other Programming Languages 0 Dec 16th, 2005 04:28


All times are GMT. The time now is 18:40.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43