Código PHP:
$sql_name_check = mysql_query("SELECT pj,d0,d1,d2,d3,d4,d5,d6,d11,d12,d13,d14,d15,d16,d17,d18,d21,d22 FROM cuentas WHERE pj='$character_get'");
$name_check = mysql_num_rows($sql_name_check);
$info = mysql_fetch_row($sql_name_check);
foreach ($info as $key => $item) {
if($item == -1)
$item[$key] ='Sin Clase';
}
algo asi deberia funcionar no?