![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/05/2005, 09:10
|
| | Fecha de Ingreso: diciembre-2004
Mensajes: 156
Antigüedad: 20 años, 1 mes Puntos: 0 | |
epale hermano no me corre!!! no se!!! le doy lo sparametros que me dijiste y nada!!! aqui esta el codigo:
$fd= "select codigo, descripcion from conceptos";
$resultado = mysql_query($fd, $corpcasa) or die(mysql_error());
$totalRows_Recordset1 = mysql_num_rows($resultado);
$recibo= mysql_fetch_array($resultado);
while ($registro = mysql_fetch_array($resultado)) {
$string = $string.$resultado['codigo']."=".$resultado['descripcion']."#";
}
$array = explode("#",$string);
$list = $resultado["string"];
$valores = explode("#",$list);
for($i=0;$i<=count($valores)-1;$i++){
$codigoLista = substr($valores[$i],0,3);
$lenLista = strlen($codigoLista)+1;
$valorLista = substr($valores[$i],$lenLista);
$nombre = nombre($codigoLista,$array);
echo $nombre."=".$valorLista."\n";
}
function nombre($codigoLista,$array){
for($e=0;$e<count($array)-1;$e++){
$len = strlen($codigoLista)+1;
$codigos = substr($array[$e],0,3);
$texto = substr($array[$e],$len);
if($codigos==$codigoLista){
return $texto;
break;
}
}
} |