Ver Mensaje Individual
  #11 (permalink)  
Antiguo 08/06/2011, 06:48
tumbero_x
 
Fecha de Ingreso: octubre-2010
Ubicación: Buenos Aires
Mensajes: 557
Antigüedad: 13 años, 6 meses
Puntos: 4
Respuesta: Problemas con condicion

Perfecto Sos un CAPO!!!
me quedo asi y funciona vos me podria indicar si hay algo mal (por las dudas)
Código PHP:
Ver original
  1. $con = 0;
  2. $con1 = 0;
  3. $con2 = 0;
  4. $con3 = 0;
  5. $con4 = 0;
  6. $con5 = 0;
  7. $con6 = 0;
  8. $con7 = 0;
  9. $con8 = 0;
  10. $con9 = 0;
  11.  
  12. foreach ($stk_suc as $item)
  13. {
  14.  if ($item == 01) { $con ++; }
  15.  if ($item == 02) { $con1 ++; }
  16.  if ($item == 03) { $con2 ++; }
  17.  if ($item == 04) { $con3 ++; }
  18.  if ($item == 05) { $con4 ++; }
  19.  if ($item == 06) { $con5 ++; }
  20.  if ($item == 07) { $con6 ++; }
  21.  if ($item == 08) { $con7 ++; }
  22.  if ($item == 09) { $con8 ++; }
  23.  if ($item == 10) { $con9 ++; }
  24. }
  25.  
  26. if($con == count($stk_suc)  or
  27.    $con1 == count($stk_suc) or
  28.    $con2 == count($stk_suc) or
  29.    $con3 == count($stk_suc) or
  30.    $con4 == count($stk_suc) or
  31.    $con5 == count($stk_suc) or
  32.    $con6 == count($stk_suc) or
  33.    $con7 == count($stk_suc) or
  34.    $con8 == count($stk_suc) or
  35.    $con9 == count($stk_suc))
  36. {
  37.  
  38. echo '<tr>';
  39. echo '<td colspan="4" style="text-align:center;font-weight:bold">Todos los Articulos Fueron Ingresados en Sucursal '.$item.'</td>';
  40. echo '</tr>';
  41.  
  42. }
  43. else
  44. {
  45. for($num=0;$num<sizeof($compra_arti_id);$num++)
  46. {
  47. echo '<tr>';
  48. echo '<td>'.$compra_cod_art[$num].'</td>';
  49. echo '<td>'.$compra_descripcion[$num].'</td>';
  50. echo '<td>'.$compra_cantidad[$num].'</td>';
  51. echo '<td>'.$stk_suc[$num].'</td>';
  52. echo '<tr>';
  53. }
  54. }