it shows"-- Debug: Undefined variable: wordscut on line 168 of /wp-content/theme"

function cutstr($string, $length) {
         $string =strip_tags($string);
[xe1-xef][x80-xbf][x80-xbf]|xf0[x90-xbf][x80-xbf][x80-xbf]|[xf1-xf7][x80-xbf][x80-xbf][x80-xbf]/", $string, $info);  
         for($i=0; $i<count($info[0]); $i++) {
                $wordscut.= $info[0][$i];
                $j= ord($info[0][$i]) > 127 ? $j + 2 : $j + 1;
                 if ($j > $length - 3) {
                         return $wordscut." ...";
         return join('', $info[0]);

the above mentioned is my function. i understand in php, it's right if your variable does not be declared prior to it being used.why it shows"Undefined variable: wordscut, j..... thanks.

2,* Needed: Non-printable characters were found in the '''functions.php''' file. You might want to take a look apply for errors.

what's Non-printable characters .how you can correct it? thanks.

This really is one one classic bug.

When PHP began your script, $wordscut isn't defined. Advertising media are

$wordscut .= "sometext";

The code really do

$wordscut = $wordscut . "sometext";

At this time, $wordscut isn't available, thus Undefined Variable error happened.

To repair it, add

$wordscut = '';


for($i=0; $i<count($info[0]); $i++) {