|
|
|
|
|
<html><head><title>rancolor</title></head>
<body>
<?php
function randColor()
{
$letters = "1234567890ABCDEF";
for($i=0;$i<6;$i++)
{
$pos = rand(0,15);
$str .= $letters[$pos];
}
return "#".$str;
}
for($i=1;$i<6;$i++)
{
echo '<span style="color:'.randColor().'">Random Color Text</span><BR>';
}
?>
</body></html> |
|
| Phorum, MySQL, Language, UK date format, MySQL UK Date format Categories : PHP, Date Time, Strings, MySQL, Databases | | | Newbie Notes #7 - Ridiculous regex Categories : PHP, Beginner Guides, Regexps | | | PHP based Contact email form with multiple recipients, text file based, supports departments. Categories : PHP, Email, Beginner Guides, Filesystem | | | Real simple example of removing HTML tags from text then changing \n (new line) to <br>. Could be used in a forum for instance. Categories : HTML, PHP, HTML and PHP, Beginner Guides | | | Parse string to find sub-string between two arbitrary strings Categories : PHP, Strings, HTML and PHP, Arrays | | | Cut your MySQL Connections to 1 line of code Categories : PHP, Beginner Guides, Databases, MySQL | | | Convert a File database into MySQL Categories : PHP, Filesystem, Databases, MySQL, Beginner Guides | | | String Replacement and speed consideration
Categories : PHP, Strings, Regexps | | | for each record, do this to the first record, and do that to any subsequent record Categories : PHP, Databases, MySQL, Beginner Guides | | | Adding dashes to credit card numbers Categories : Strings, Credit Cards, PHP | | | Reverse a given number Categories : PHP, Beginner Guides, Algorithms, Math. | | | How to avoid the slashes (\) when retriving information from
sql when MagicQuotes are on? Categories : Strings, PHP | | | Newbie Notes #5 - To double quote, or single quote, that is the question Categories : PHP, Beginner Guides, Variables | | | Printer friendly pages from anywhere on a website. Categories : PHP, Strings, Content Management | | | News management class Categories : PHP, PHP Classes, Beginner Guides | |
| |
| |
|