",'; $sOutput .= '"'.str_replace('"', '\"', $aRow['engine']).'",'; $sOutput .= '"'.str_replace('"', '\"', $aRow['browser']).'",'; $sOutput .= '"'.str_replace('"', '\"', $aRow['platform']).'",'; if ( $aRow['version'] == "0" ) $sOutput .= '"-",'; else $sOutput .= '"'.str_replace('"', '\"', $aRow['version']).'",'; $sOutput .= '"'.str_replace('"', '\"', $aRow['grade']).'"'; $sOutput .= "],"; } $sOutput = substr_replace( $sOutput, "", -1 ); $sOutput .= '] }'; echo $sOutput; function fnColumnToField( $i ) { /* Note that column 0 is the details column */ if ( $i == 0 ||$i == 1 ) return "engine"; else if ( $i == 2 ) return "browser"; else if ( $i == 3 ) return "platform"; else if ( $i == 4 ) return "version"; else if ( $i == 5 ) return "grade"; } ?>