need help
Posted: Thu Nov 10, 2011 1:39 am
here is my code
I need to manipulate the numbers the user places in the "data" field.
i need to sort them highest to lowest.
I need to find the average.
the user can put in as many numbers as they want separated by commas.
any ideas?
Code: Select all
<html><body>
<h4>sorter</h4>
<form action="" method="post">
numbers#(seperate by commas): <input name= "data" type="text" />
<input type ="submit"/>
<form/>
<?php
$data = $_POST['data'];
?>
<table border= 1 cellspacing=1 cellpadding=2 align=center>
<tr><td>numbers entered<td/>
<td>
<?php
echo $data;
?>
<td/><tr/>
<tr><td>#'s from highest to lowest<td/>
<td>
<?php
//order numbers
?>
<td/><tr/>
<tr><td>average<td/>
<td>
<?php
//average numbers
?>
<td/><tr/>
<tr><td>sorted sequence<td/>
<td>
<?php
//seq.
?>
<td/><tr/>
<table/>
<body/>
<html/>i need to sort them highest to lowest.
I need to find the average.
the user can put in as many numbers as they want separated by commas.
any ideas?