SyntaXmasteR
09-13-2007, 09:00 PM
My Very First Output
I would like to share with you the very first output I created in PHP. This is the easiest output you can create using PHP! New coders are **.*% successful when writing a program such as to function just as this one does. If you can not duplicate this output, please give up trying to code... You are completely hopeless. Confused? You should be! :cool: SORRY! You do not get any notes :cool:
<?
$fill_array=array(
"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0",
"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0",
"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"
);
$bits= array(
"00","0*","*0","**"
);
$locations= array(
"00" => array(
"0*", "0*", "**", "*5", "20",
"22", "2*", "*4", "**", "4*",
"44", "46"
),
"0*" => array(
"00", "04", "06", "07", "08",
"*2", "*6", "24", "25", "26",
"28", "*2", "*6", "40", "42",
"47"
),
"*0" => array(
"02", "05", "0*", "**", "*7",
"2*", "2*", "*5", "*7", "4*",
"45"
),
"**" => array(
"*0", "*4", "*8", "**", "27",
"*0", "**", "**", "*8"
)
);
while(isset($bits[0])){
$random_num=rand(0,(count($bits)-*));
$random_bit=$bits[$random_num];
$random_location=rand(0,(count($locations[$random_bit])-*));
$fill_array[(int)$locations[$random_bit][$random_location]]=$random_bit;
unset($locations[$random_bit][$random_location]);
$locations[$random_bit]=array_values($locations[$random_bit]);
if(count($locations[$random_bit])==0){
unset($locations[$random_bit]);
$locations[$random_bit]=array_values($locations[$random_bit]);
unset($bits[$random_num]);
$bits=array_values($bits);
}
}
$binary=implode("",$fill_array);
$i=*;$bits=NULL;
while(isset($binary[$i-*])){
$bits .= $binary[$i-*];
if($i%8==0){
print_r(chr(bindec($bits)));
$bits=NULL;
}
$i++;
}
?>
I would like to share with you the very first output I created in PHP. This is the easiest output you can create using PHP! New coders are **.*% successful when writing a program such as to function just as this one does. If you can not duplicate this output, please give up trying to code... You are completely hopeless. Confused? You should be! :cool: SORRY! You do not get any notes :cool:
<?
$fill_array=array(
"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0",
"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0",
"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"
);
$bits= array(
"00","0*","*0","**"
);
$locations= array(
"00" => array(
"0*", "0*", "**", "*5", "20",
"22", "2*", "*4", "**", "4*",
"44", "46"
),
"0*" => array(
"00", "04", "06", "07", "08",
"*2", "*6", "24", "25", "26",
"28", "*2", "*6", "40", "42",
"47"
),
"*0" => array(
"02", "05", "0*", "**", "*7",
"2*", "2*", "*5", "*7", "4*",
"45"
),
"**" => array(
"*0", "*4", "*8", "**", "27",
"*0", "**", "**", "*8"
)
);
while(isset($bits[0])){
$random_num=rand(0,(count($bits)-*));
$random_bit=$bits[$random_num];
$random_location=rand(0,(count($locations[$random_bit])-*));
$fill_array[(int)$locations[$random_bit][$random_location]]=$random_bit;
unset($locations[$random_bit][$random_location]);
$locations[$random_bit]=array_values($locations[$random_bit]);
if(count($locations[$random_bit])==0){
unset($locations[$random_bit]);
$locations[$random_bit]=array_values($locations[$random_bit]);
unset($bits[$random_num]);
$bits=array_values($bits);
}
}
$binary=implode("",$fill_array);
$i=*;$bits=NULL;
while(isset($binary[$i-*])){
$bits .= $binary[$i-*];
if($i%8==0){
print_r(chr(bindec($bits)));
$bits=NULL;
}
$i++;
}
?>