$arrayNum[] = explode(' ',"3 5 8"); if ($arrayNum[0][0] + $arrayNum[0][1] = $arrayNum[0][2]) { echo "Correct"; }else{ echo "Incorrect"; }