public function formatString($input)
    {
        if (is_array($input)) {
            $input = join(', ', $input);
        }
        $output = strip_tags($input);
        $output = str_replace(array("'", "\r", "\n"), array("''", ' ', ' '), $output);
        //$output = "'" . $output . "'";
        return $output;
    }
public function formatString($input)
    {
        if (is_array($input)) {
            $input = join(', ', $input);
        }
        $output = strip_tags($input);
        $output = str_replace(array("'", "\r", "\n"), array("''", ' ', ' '), $output);
        //$output = "'" . $output . "'";
        return $output;
    }
public function formatString ( $ input ) { if ( is_array ( $ input ) ) { $ input = join ( ', ' , $ input ) ; } $ output = strip_tags ( $ input ) ; $ output = str_replace ( array ( "'" , "\r" , "\n" ) , array ( "''" , ' ' , ' ' ) , $ output ) ; //$output = "'" . $output . "'"; return $ output ; }
Formatting of strings for SPSS export. Enclose in single quotes and escape single quotes
with a single quote

Example:
This isn't hard to understand
==>
'This isn''t hard to understand'

@param type $input
@return string
Formatting of strings for SPSS export . Enclose in single quotes and escape single quotes with a single quote