Jon
0
Q:

php workspace

<?php
  $x[0]=22 ; $x[1]=32;$x[2]=35;$x[3]=40;
for($i=0;$i<=count($x)-1;$i++)
echo $x[$i];
echo "<br>" .count($x);
echo "<br> thesumof array valueis = $r <br> " ;
function findsum($a)
{
 $sum=0
for($i=0 ;$i<count($a);$i++)
$sum+=$a[$i];
return $sum;
}
$r=findsum($x);
$l=largest($x);
echo"<br>" the largest value is = $l<br> " ; 
function largest($q)
{
$l=$q[0];
for($i=1;$i<count($q);$i++)
if($q[$i]>$l)$l=$q[$i];
return $l ; 
} 
?>
0

New to Communities?

Join the community