Jump to content

[SOLVED] help with script


shedokan

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.