This code runs @ http://www.ckoogle.com but the trouble is once I get
the list backwards, and in an array. I can't sort the new array into
alphabetical order. Anyone know a way to do it?
<?php
echo '<form action="index.p hp" method="post">' ;
echo '<textarea name="input" cols="12" rows="20">';
echo '</textarea><br>';
echo '<input type="submit" value="Submit"> ';
echo '</form>';
if( isset( $_POST["input"] )){
$my_array = $_POST["input"];
$my_array=strre v($my_array);
$my_array=explo de("\n", $my_array);
print_r($my_arr ay);
sort($my_array) ;
print_r($my_arr ay);
for($cnt=0; $cnt < count($my_array ); $cnt++)
{
echo(strrev($my _array[$cnt]));
echo('<br>');
}
}
?>
the list backwards, and in an array. I can't sort the new array into
alphabetical order. Anyone know a way to do it?
<?php
echo '<form action="index.p hp" method="post">' ;
echo '<textarea name="input" cols="12" rows="20">';
echo '</textarea><br>';
echo '<input type="submit" value="Submit"> ';
echo '</form>';
if( isset( $_POST["input"] )){
$my_array = $_POST["input"];
$my_array=strre v($my_array);
$my_array=explo de("\n", $my_array);
print_r($my_arr ay);
sort($my_array) ;
print_r($my_arr ay);
for($cnt=0; $cnt < count($my_array ); $cnt++)
{
echo(strrev($my _array[$cnt]));
echo('<br>');
}
}
?>
Comment