Forum Moderators: coopster
[code]
<?
/* Some will think this is fun...
So I just decided to share my findings... :0)
-- Zak
*/
$a = 1;
$b = 2;
$c = 3;
$d = 4;
$e = 5;
$f = 6;
$g = 7;
$h = 8;
$i = 9;
$j = 10;
$k = 11;
$l = 12;
$m = 13;
$n = 14;
$o = 15;
$p = 16;
$q = 17;
$r = 18;
$s = 19;
$t = 20;
$u = 21;
$v = 22;
$w = 23;
$x = 24;
$y = 25;
$z = 26;
$Hardwork = $h + $a + $r + $d + $w + $o + $r + $k;
$Knowledge = $k + $n + $o + $w + $l + $e + $d + $g + $e;
$Attitude = $a + $t + $t + $i + $t + $u + $d + $e;
echo "<html><body><center><H1>";
echo"The following results are figured based on <font color=red>a=1 b=2 ... z=26</font> <br><br>";
echo "Hard Work = <font color=red>\"$Hardwork\"%</font><br><br>";
echo "Knowledge = <font color=red>\"$Knowledge\"%</font><br><br>";
echo "Attitude = <font color=red>\"$Attitude\"%</font><br><br>";
echo "</H1></center></body></html>";
?>
[\code]
;) <?php
...
$word = "anything";
$count=0;
$percentage = 0;
while ($count < strlen($word)) {
$percentage += ${substr($word,$count,1)};
$count++;
}
echo "<html><body><center><H1>";
echo "$word = <font color=red>\"$percentage\"%</font><br><br>";
...
?>
...maybe put the dictionary in an array, loop through it, and build a life philosophy...
Now, back to "hard work!"
I am actually going to try that this week sometime. Have it write to a database and asign characteristics to each of the words based on their #.. lol