I am trying to find out the best way of going about string replacement with multiple collations.

I have a sentence which is inserted by user, i have an array which of all the miss-spelled words in that sentence and their potential corrections.

`$sentence = 'i want to recovary my vehical from the cabs';`

I want to display the following:

1. i want to recovery my vehicle from the cabs
2. i want to recover my vehicle from the cabs
3. i want to revary my vehicle from the cabs

Code so far:

```
$element = array(
    "vehical" => array('vehicle'),
    "recovary" => array('recovery', 'recover', 'revary')
);

$sentence = 'i want to recovary my vehical from the cabs';

foreach($element as $i => $val){
    echo $i;    
}

```

EDIT: Expanded another scenario:

What would happen if there was more than one variation in the top array.

```
    "vehical" => array('vehicle', 'vehiclesy', 'whatever'),
    "recovary" => array('recovery', 'recover', 'revary')

```

1. i want to recovery my vehicle from the cabs
2. i want to recovery my vehiclesy from the cabs
3. i want to recovery my whatever from the cabs
4. i want to recover my vehicle from the cabs
5. i want to recover my vehiclesy from the cabs
6. i want to recover my whatever from the cabs
7. i want to revary my vehicle from the cabs
8. i want to revary my vehiclesy from the cabs
9. i want to revary my whatever from the cabs