is there anyway to make a GD graph from results of a function
[code=php]
<form action=”<?$_SERVER[‘PHP_SELF’];?>” method=”post”>
<input type=”text” name=”number”>
<br />
<input type=”submit” name=”submit” value=”Calculate”>
</form>
<?php
function coinFlip50()
{
$count=array();
for($j=50; $j–;)
{
$rand=rand(0, 1);
if($rand==”1″)
{
$blah=count($result);
$blah2=$blah+ 1;
$result = array_pad($count, $blah2, 0);
}
}
echo count($result);
echo”<br>”;
}
function coinFlips($number)
{
for($i=$number; $i–;)
{
coinFlip50();
}
}
if(isset($_POST[‘submit’]))
{
coinFlips($number);
}
?>
I have this php script I just wrote up, is there anyway to take all of the results(the # from each time it loops , you can test the script here: [url]http://complexfellow.com/flip50.php