I would like to restructure the array (not traditional sort), based on providing the wanted index order, e.g. [1,7,4].
Below just sorts ascending order based on value.

**wanted result:**

```
Array
(
    [1] => c
    [4] => b
    [7] => a
)

```

---

**My code:**

```
$array = [];

$array[4] = "b";
$array[1] = "c";
$array[7] = "a";

print_r($array);

echo "\n\n" . "Sort ascending..." . "\n\n";
asort($array);
print_r($array);

```

**Result:**

```
Array
(
    [4] => b
    [1] => c
    [7] => a
)

Sort ascending...

Array
(
    [7] => a
    [4] => b
    [1] => c
)

```