L'errore è

Notice: Uninitialized string offset: 8 in /var/www/vhosts/ecmadistanza.it/httpdocs/prova/JSON.php on line 308

Però ripetuto più volte anche sulle righe 309, 320, 321, 331, 332, 333, 334,
Praticamente tutte quelle con contenuto del tipo ord($var{$c + 1})

Ho provato a stampare il carattere che mi da errore con un echo $var{$c} in tutte le righe d'errore e mi ha dato una ì accentata.

Non so come riprodurti l'errore, io uso questo script che prende i dati dal mio db

codice:
function getList(){
	$query = "select id_utente, nome, cognome, usern from tbl_ana_utenti, tbl_ana_prof_sanitaria where tbl_ana_utenti.id_prof_sanitaria=tbl_ana_prof_sanitaria.id_prof_sanitaria";
	$result=mysql_query($query);
	$num=mysql_num_rows($result);
	if ($num>0){
		while($utente=mysql_fetch_array($result)){
			$arr[] = $utente;
		}
		$jsonresult = JEncode($arr);
		echo '({"total":"'.$num.'","results":'.$jsonresult.'})';
	} else {
		echo '({"total":"0", "results":""})';
	}
}