$word) { if (!$word) { break; } if ($i) { print ","; } if (pspell_check($speller, $word)) { print '[1]'; } else { print '[0,['; $suggestions = pspell_suggest($speller, $word); if (count($suggestions) > 0) { print '"' . implode('","', $suggestions) . '"'; } print ']]'; } $i++; }; print "];\n"; ?>