What I'm trying to do is take an array that I created and look for key abbreviations in that array, if it finds something it will append a variable until all item in the array have been found, then returns the appended variable.
Having trouble with it though...
function check_programs($input) {
// Replaces the array with longer string.
$programs = array($input);
$check = 0;
$return_string = '';
while ($check <= $programs){
if(array_search('ma', $programs) == true){
$return_string .= "Maya, ";
$check ++;
}elseif(array_search('ps', $programs) == true){
$return_string .= "Photoshop, ";
$check ++;
}elseif(array_search('ai', $programs) == true){
$return_string .= "Illustrator, ";
$check ++;
}elseif(array_search('xn', $programs) == true){
$return_string .= "xNormal, ";
$check ++;
}else(array_search('mm', $programs) == true){
$return_string .= "MatchMover, ";
$check ++;
}
return $return_string;
}