prueba haciendo
Código PHP:
<SCRIPT LANGUAJE='javascript'>
var aPaises = new Array(<? echo $texto; ?> ')
</script>
<?
$link= mysql_connect("localhost","root","");
mysql_select_db("web_uted ",$link);
$sql2 = "Select codigo_curso, nombre from cursos order by nombre";
$rs2 = mysql_query($sql2,$link);
while(list($precio)=mysql_fetch_row($rs2))
{
$texto.=$precio."\n";
}
echo "<pre>".$texto."</pre>";
?>
Saludos