Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/06/2010, 16:03
Sirrion
 
Fecha de Ingreso: junio-2010
Mensajes: 19
Antigüedad: 13 años, 10 meses
Puntos: 0
Ayuda con mi script

Buenas tengo un problema con un script que tengo, me muestra las noticias de 1 mes en el yahoo news sobre los temas que le indico y me da el total de noticias que hay sobre ello, el problema es que los resultado el separador de unidades de millar me los da con una "," y quiero que me los separe con un "." y no se como hacerlo la verdad a ver si me podeis ayudar gracias.

Código:
<?php

While ($cont<=$fin) {

                                      
     $contenido = file_get_contents('http://news.search.yahoo.com/search;_ylt=A0wNdJwXeyJMl4QBT.rqwgt.?_adv_prop=web&x=op&ei=UTF-8&fr=sfp&fr2=&va=&va_vt=any&vp='.$mis_valores[$cont].'&vp_vt=any&vo=&vo_vt=any&ve=&ve_vt=any&sort=&timeago=&pub=1&smonth=5&sday=24&emonth=6&eday=23&source=&location=&catfilt=&fl=1&vl=lang_sq&vl=lang_ar&vl=lang_bg&vl=lang_ca&vl=lang_zh-CN&vl=lang_zh-TW&vl=lang_hr&vl=lang_cs&vl=lang_da&vl=lang_nl&vl=lang_en&vl=lang_et&vl=lang_fi&vl=lang_fr&vl=lang_de&vl=lang_el&vl=lang_iw&vl=lang_hu&vl=lang_is&vl=lang_id&vl=lang_it&vl=lang_ja&vl=lang_ko&vl=lang_lv&vl=lang_lt&vl=lang_ms&vl=lang_no&vl=lang_fa&vl=lang_pl&vl=lang_pt&vl=lang_ro&vl=lang_ru&vl=lang_sr&vl=lang_sk&vl=lang_sl&vl=lang_es&vl=lang_sv&vl=lang_pht&vl=lang_th&vl=lang_tr&vl=lang_vn&n=10');
   
     $lineas=explode('<strong id="resultCount">',$contenido);

    $noticias=explode('</strong>',$lineas[1]);

     echo '<tr><td>El numero de noticias en 1 mes de </td><td>'.$mis_valores[$cont].'</td><td> está en </td><td>'.$noticias[0].'</td></tr>';
     
     $num_noticias = str_replace(",",".",$noticias[0]); 
    
	 $que = "INSERT INTO famas (nombre, notis) ";

    $que.= "VALUES ('".$mis_valores[$cont]."','".$num_noticias."' ) ";
 
    $res = mysql_query($que, $conexion) or die(mysql_error());
   
$cont++;

}


?>