Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old December 1st, 2005, 06:19 AM   #1
New Member
 

Join Date: Dec 2005
Age: 31
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 amit_shetye is on a distinguished road
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
amit_shetye is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 1st, 2005, 12:54 PM   #2
Reputable Member
 

Join Date: Sep 2005
Location: Canada, BC
Age: 25
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Pheonix will become famous soon enough
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...
Code:
<?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; December 1st, 2005 at 01:39 PM..
Pheonix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 1st, 2005, 04:50 PM   #3
Most Reputable Member
 

Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 23
Posts: 1,063
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 sypher has a spectacular aura about sypher has a spectacular aura about
Re: html to php conversion

If you wanting to put HTML inside PHP instead of PHP inside HTML you can do it such as:
Code:
echo '<html>';
echo 
'<head></head>'
I think you get the idea
__________________
North Wales Web Design - sypher design
sypher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 1st, 2005, 08:51 PM   #4
Reputable Member
 
Tim356's Avatar
 

Join Date: Nov 2003
Location: Australia
Age: 27
Posts: 329
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Tim356 will become famous soon enough
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:
<?php
?>
Tim356 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 2nd, 2005, 01:00 AM   #5
New Member
 

Join Date: Dec 2005
Age: 31
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 amit_shetye is on a distinguished road
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
amit_shetye is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 2nd, 2005, 03:07 AM   #6
Reputable Member
 

Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 grahame is a jewel in the rough grahame is a jewel in the rough grahame is a jewel in the rough
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.
grahame is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 2nd, 2005, 06:17 PM   #7
Reputable Member
 

Join Date: Sep 2005
Location: Canada, BC
Age: 25
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Pheonix will become famous soon enough
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.
Pheonix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
html , php , conversion


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 The Café 10 August 16th, 2007 04:29 AM
Non-English PDF File Conversion to XML proaudience The Café 0 June 18th, 2007 04:46 PM
Language Conversion jpvsd Other Languages 0 June 15th, 2006 01:42 PM
XML to db conversion swetha Other Languages 0 December 16th, 2005 12:28 AM


Search Engine Optimization by vBSEO 3.2.0 RC8