Jump to content
xisto Community
Sign in to follow this  
iGuest

Htlm & php

Recommended Posts

no aflm. If you have coded into PHP language you can't rename it and then it will turn auto change. Like if u have made a program in VB you can't accidently by a rename make it html. I am not sure if there is such a program though why not just google HTML>PHP or HTML to PHP smth like this anywayz.

Share this post


Link to post
Share on other sites

Do you know any translator please ?

What exactly do you want? If you save a file as a .php and then view it through a web server, anything within the <?php ?> tags will be parsed as php and turned into HTML which the browser displays. If you are looking for a php parser, download Apache, which should come with php and set it up on your computer.

Share this post


Link to post
Share on other sites

I want insert the php code in a htlm and to have a result indentic

A result what?

To insert it into html just put it within <?php ?> tags, so

<?php echo "php can go before the html starts"; ?>

<html>
<head>
<title><?php echo "php generated title"; ?></title>
</head>

<body>
<?php echo "php can go in the body too"; ?>
</body

</html>
<?php echo "php can also go at the end"; ?>

Share this post


Link to post
Share on other sites

I want insert the php code in a htlm and to have a result indentic

A result what?

To insert it into html just put it within <?php ?> tags, so

<?php echo "php can go before the html starts"; ?>

<html>
<head>
<title><?php echo "php generated title"; ?></title>
</head>

<body>
<?php echo "php can go in the body too"; ?>
</body

</html>
<?php echo "php can also go at the end"; ?>
even result

Share this post


Link to post
Share on other sites

I don't get it but just guessing... if you want to run PHP code on a HTML file, that's no possible of course but you could use a HTML file with an iFrame and the iFrame source could be a PHP script.Or maybe you want to show PHP source code as HTML, if so you could rename the file to .phps [it works if the webserver has the proper configuration] or you could use PHP's highlight_file() or highlight_string() to output PHP source code with sintax highlight. Otherwise you should be more specific about what you're asking.

Share this post


Link to post
Share on other sites

Hmm.. you mean to have a result "indentED"? If so you can do something like, <? echo " t $variable or whatever result in here"?>the " t " = tabbing a few spaces to the right. Or you can use CSS:<? echo "<span style ='text-indent:2em;'> result </span> "?>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.