// example of 1..12x12 table
for($i = 1; $i <= 12; $i++)
{
for($j = 1; $j <= 12; $j++)
{
print ($i * $j) ." ";
}
print "\n";
}
AnswerTo get the list of currently loaded extensions within a PHP program. Use get_loaded_extensions() function.To check what extensions are loaded by PHP on a given server, type this on the command line:php -mHere is a php script that will list the loaded extensions in a table. Save this file as phpext.php and place it on your website. Go to this file in your web browsers and see a list of loaded extensions:
You can use Cascading Style Sheets (CSS) to create website themes for your PHP website.
This program only suits PHP. If you want a proper one try C program for it available on web <body> <?php if(isset($_POST['submit'])) { $text = $_POST['text']; $string = mysql_real_escape_string($text); $invert = strrev($string); if($string == $invert) { echo "<br>Given number is a palindrome!!"; } else { echo "<br>Given number is not a palindrome!!"; } } ?> <form method="post"> <input type="text" name="text" id="text" /> <input type="submit" name="submit" value="Submit" id="submit" onclick="<?php $_SERVER['PHP_SELF']; ?>" /> </form> </body>
PHP and C are two different programming languages that cannot directly interact with eachother. You can have a program made with C call a PHP script, using its output (an indirect interaction), but there's no way to "embed" PHP into C code.
It is normally interpreted by another computer program. However subsets of the language can be compiled.
well, as such there is no Widget in php. You need to write your own widget program if you are interested to develop. You must be aware of wordpress built on php plateform and that uses widget extensively :)
You can do this: <?php if ( $word === strrev( $word ) ) { echo "The word is a palindrome"; } else { echo "The word is not a palindrome"; }
It is really simple to print an HTML table in PHP, all you have to do is the following: <?php print "<table>"; print "<tr>"; print "<td>hello</td>"; print "</tr>"; print "</table>"; ?>
Ratinonal program in php
$n = 10*(1+10)/2;
We can write php extension is many way... .php , .php5, .php4
Well if you know php then you can write your own algorithm php syntax is <?php //open php tag $num = 1; $num2 = 2; $total = $num + $num2; echo $total; ?> //close php tag
A host that allows you to write in PHP
PHP is in interpreted language, and ships with one, however PHP itself is a program language and not an interpreter.
<?php echo "Hello world"?>
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
AnswerTo get the list of currently loaded extensions within a PHP program. Use get_loaded_extensions() function.To check what extensions are loaded by PHP on a given server, type this on the command line:php -mHere is a php script that will list the loaded extensions in a table. Save this file as phpext.php and place it on your website. Go to this file in your web browsers and see a list of loaded extensions: