shedokan Posted February 7, 2008 Share Posted February 7, 2008 I have this script: <?php $real=array(0=>'t',1=>'x',2=>'v',3=>'c',4=>'b',5=>'t',6=>'x',7=>'v',8=>'c',9=>'b',10=>'t',11=>'x',12=>'v'); for($a=0;$a<=4;$a++){ for($b=0;$b<=4;$b++){ for($c=0;$c<=4;$c++){ echo $real[$a].'+' .$real[$b].'+' .$real[$c].'=' .$real[$a+$b+$c].'<br>'; } } } ?> is echoes something like: v+c+b=x v+c+x=b t+t+t=x etc. but I want for it to echo something like this: v+c+b=x t+t+t=x v+c+x=b so it will order by the result. Link to comment https://forums.phpfreaks.com/topic/89903-solved-help-with-script/ Share on other sites More sharing options...
shedokan Posted February 7, 2008 Author Share Posted February 7, 2008 please. Link to comment https://forums.phpfreaks.com/topic/89903-solved-help-with-script/#findComment-460854 Share on other sites More sharing options...
amites Posted February 7, 2008 Share Posted February 7, 2008 try looking up the sort function simple tutorial for it can be found here http://www.developertutorials.com/tutorials/php/sorting-array-php-051114/page1.html Link to comment https://forums.phpfreaks.com/topic/89903-solved-help-with-script/#findComment-461040 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.