Forum Moderators: coopster

Message Too Old, No Replies

A fun bit of PHP

         

lZakl

5:19 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



I thought some of you would think this was cool...

[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]

jatar_k

5:25 pm on Dec 28, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



hehe funny

the problem is though

$laziness = $l + $a + $z + $i + $n + $e + $s + $s;

Laziness = "105"% ;)

genusapiens

5:27 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



Tried it and I agree its fun ^^ there may be even truth in it. Hey attitude counts (a lot).

lZakl

5:48 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



Laziness = "105"% ;)

That's pretty rotten... lol hehehe

Salsa

7:02 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



Well, I didn't find anything to equal "laziness," but "distraction" sure did
beat it! And at least "anything" equals "hard work."
;)

<?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!"

lZakl

7:39 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



lol, maybe THIS is the key to the Omega Code eh? I think I'll try Salsa's idea and put a spell check dictionary to the test... words closest to 100 are the most important of course... (Since us humans place high value on specific things such as a number or symbol, I've explored this and have yet to be able to explain it.) ;0)

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

mincklerstraat

11:19 am on Dec 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



jatar_k >> Laziness = "105"%

How true. Laziness might just be the biggest factor when it comes to creatively innovative programming.

ergophobe

9:42 pm on Dec 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Laziness = "105"% ;)

Your point being that the number is too low I assume?