Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/06/2010, 09:52
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: foreach sin repetir

puedes guardar en un array.. y luego usar array_unique para eliminar repeticiones y luego imprimes

Código PHP:
Ver original
  1. foreach ($xml->resultados->cotizados->articulo as $sarticulo) {
  2.   $variable[] = $sarticulo->nombre_prestatario;
  3. }
  4. echo implode("<br />", array_unique($variable));
__________________
More about me...
~ @rhyudek1
~ Github