I have a list of Operating systems. If someone enters something like "Ubuntu", I would like to correct that to "Linux Ubuntu". I have various other corrections like this and I'm wondering if there is an efficient way to go through an array making all these corrections?
I was thinking of having an associative array with name and key pairs; the key being the "from" field and the name being the "to". Is there a better way to do this more efficiently?
Sample array:
$os = array('Ubuntu', 'VMWare', 'CentOS', 'Linux Ubuntu');
The above values is just an example of some of the data. But essentially some of them will be correct, some will not be though, and they will need to be corrected.