Thanks to bird for telling me how to use $ _ POST. The code is as follows :? Phpif ($ _ POST ["perdata"] = "") {$ _ POST ["perdata"] = "1234 ";} $ data = chop (trim ($ _ POST ["perdata"]); $ a = explode ("",
Thanks to bird for telling me how to use $ _ POST. The code is as follows:
If ($ _ POST ['perdata'] = '')
{
$ _ POST ['perdata'] = '1 2 3 4 ';
}
$ Data = chop (trim ($ _ POST ['perdata']);
$ A = explode ('', $ data );
Sort ($ );
$ Data = implode ('', $ );
?>
Function nextpermu (& $ c)
{
$ S = sizeof ($ c );
$ I = $ s-1;
While ($ I> 0)
{
If ($ c [$ I]> $ c [$ i-1])
{
$ J = $ S-1;
While ($ c [$ j] <= $ c [$ i-1])
$ J --;
$ T = $ c [$ i-1];
$ C [$ i-1] = $ c [$ j];
$ C [$ j] = $ t;
// Echo $ I. '-'. $ j .'
';
For ($ j = $ S-1; $ I <$ j; $ I, $ j --)
{
$ T = $ c [$ I];
$ C [$ I] = $ c [$ j];
$ C [$ j] = $ t;
}
Return true;
}
$ I --;
}
For ($ I = 0, $ j = $ S-1; $ I <$ j; $ I, $ j --)
{
$ T = $ c [$ I];
$ C [$ I] = $ c [$ j];
$ C [$ j] = $ t;
}
Return false;
}
?>
Arrangement-Dictionary
Current element:
| Serial Number |
Arrange |
$ Num = 1;Do{?>
|
|
|
$ Num;}While (nextpermu ($ ));?>