No creo que le interese a nadie, pero así siempre lo tengo a mano
<? $data=""; $result=mysql_query("SELECT * FROM tabla"); while($row = mysql_fetch_array($result)){ $data .='"'.str_replace("\r","",implode('","',$row)).'"'."\n"; } header("Content-length: ".strlen($data)); header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=datos.csv"); header("Pragma: no-cache"); header("Expires: 0"); print $data; ?>
This entry was posted on Thursday, September 4th, 2008 at 16:20 and is filed under Informática. You can follow any responses to this entry through the RSS 2.0 feed. RSS 2.0. You can leave a response, or trackback from your own site.
September 7th, 2008 at 00:30
¿Ein? Azí hablaba Zaratustra, zí zeñó ( y ahora Curriyón). Y por eso no le entendía ni Cristo. Ahora que yo soy cortito para los chistes; siempre me los tienen que explicar. Un abrazo, maestro.
September 7th, 2008 at 14:25
que razon tienes, solo te interesa a ti
December 27th, 2008 at 20:54
mientes conchi, a mí también, pero cuando tenga más conocimientos ::sermon::
December 31st, 2008 at 06:53
Oye Fabuloso, andaba buscando una funcion asi, utilize un programa q lo hacia y me funciono muy bien pero esto es mucho mas simple gracias por el aporte ;o)