public function convertToNato($string)
    {
        $natoReturn = array();

        for($i=0; $i < strlen($string); $i++) {
            $currentLetter=substr($string,$i,1);

            if (! empty($this->nato[$currentLetter])) {
                $natoLetter = strtolower($this->nato[$currentLetter]);
            } else if (! empty($this->nato[strtolower($currentLetter)])) {
                $natoLetter = strtoupper($this->nato[strtolower($currentLetter)]);
            } else {
                $natoLetter = $currentLetter;
            }
            $natoReturn[] = $natoLetter;
        }

        return implode(" ",$natoReturn);
    }
public function convertToNato($string)
    {
        $natoReturn = array();

        for($i=0; $i < strlen($string); $i++) {
            $currentLetter=substr($string,$i,1);

            if (! empty($this->nato[$currentLetter])) {
                $natoLetter = strtolower($this->nato[$currentLetter]);
            } else if (! empty($this->nato[strtolower($currentLetter)])) {
                $natoLetter = strtoupper($this->nato[strtolower($currentLetter)]);
            } else {
                $natoLetter = $currentLetter;
            }
            $natoReturn[] = $natoLetter;
        }

        return implode(" ",$natoReturn);
    }
public function convertToNato ( $ string ) { $ natoReturn = array ( ) ; for ( $ i = 0 ; $ i < strlen ( $ string ) ; $ i ++ ) { $ currentLetter = substr ( $ string , $ i , 1 ) ; if ( ! empty ( $ this -> nato [ $ currentLetter ] ) ) { $ natoLetter = strtolower ( $ this -> nato [ $ currentLetter ] ) ; } else if ( ! empty ( $ this -> nato [ strtolower ( $ currentLetter ) ] ) ) { $ natoLetter = strtoupper ( $ this -> nato [ strtolower ( $ currentLetter ) ] ) ; } else { $ natoLetter = $ currentLetter ; } $ natoReturn [ ] = $ natoLetter ; } return implode ( " " , $ natoReturn ) ; }
Convert to Nato from String

@param $string
@return string
Convert to Nato from String