How to insert PHP code into HTML?

To be able to use php code on a page with an extension other than .php, you need a server which supports .htaccess files. To add an extension to be parsed for php, create or edit a file called .htaccess (with the dot first) containing the following line:

Php generate random severeal numbers one time

srand((double)microtime()*1000000); $random_number1 = rand(1,60); echo (”$random_number1 “); $random_number2 = rand(1,60); echo (”$random_number2 “);

Using php to control many domains withing one web host

can build many web sites, with one web host, one site with one different domain, just using php, it can make you very happy, save your money. $arrays=array( ’’=>’money/index.html’, ’’=>’insurance/index.html’, ’’=>’car/index.html’, ’’=>’travel/index.html’, ’’=>’forum/index.php’, ); $url = $arrays[$_SERVER[’HTTP_HOST’]]; Header(”Location: $url”); ?>

Delete all hyperlinks on a sheet in Excel 2003/XP/2000/97

: I’ve had a hyperlink problem in my Excel files for ages: false hyperlinks had crept in (even in empty cells) and were multiplying regularly whenever I inserted new lines. How can I delete all hyperlinks in a sheet at once and not have to delete them cell by cell?

Php generate random numbers

/*random function $length: length of needed number */ function random($length) { $hash = ”; $chars = ‘0123456789′; $max = strlen($chars) – 1; mt_srand((double)microtime() * 1000000); for($i = 0; $i < $length; $i++) { $hash .= $chars[mt_rand(0, $max)]; }

Remove hyperlinks ( A tag) from HTML

Sometimes we want to remove hyperlinks with anker text, sometimes only keep anker text, how to use php to achive this? First, only remove hyperlink, and keep anker text part, the code is: $text = ‘Test paragraph.’;


— Renames a file or directory Description bool rename ( string $oldname , string $newname [, resource $context ] ) Attempts to rename oldname to newname .