🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1236

Re: script php

#1236
From: Hector Vergara
Date: Fri, 01 Dec 2006 05:02
39 lines
1972 bytes
la solucion de JMS es mucho mas elegante (agregando el == 0 al modulo)

"RobertoCL" <rcl2020NOSPAM@hotmail.com> escribi� en el mensaje 
news:eknmh4$tua$1@news.nivel5.cl...
> "Jos� Miguel Santib��ez" <jms.nospam@nivel5.cl> escribi� en el mensaje 
> news:Xns988BEA82E4EF7jmsnews@200.27.221.71...
>> En el cap�tulo anterior (news:ekni23$sgs$1@news.nivel5.cl), "RobertoCL"
>> <rcl2020NOSPAM@hotmail.com> dijo:
>>
>>> A modo de ejemplo tengo
>>>
>>> for ($i=0; $i<100;$++){
>>> if ($i % 2) echo "interlinea<br/>";
>>> }
>>>
>>> Eso imprime a la segunda iteraci�n de $i, como hago para que imprima
>>> cada 20 iteraciones?
>>>
>>> --
>>> RCL
>>>
>>
>>
>> for ($i=0; $i<100;$++){
>> if ($i % 20) echo "interlinea<br/>";
>> }
> Gracias, pero no es eso, es algo asi
>
> for ($i=0; $i<100;$i++){
> $n = $i / 20;
> echo  "$i <br/>";
> if (strlen ($n) == 1 and $i > 1 ) echo  "<b> EN:  $i </b><br/>\n";
> }
>
> Quizas mas elegante...
> --
> RCL
>
> 
Technical Details
Message-ID: <eknun6$jk$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
References: <ekni23$sgs$1@news.nivel5.cl> <Xns988BEA82E4EF7jmsnews@200.27.221.71> <eknmh4$tua$1@news.nivel5.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,fc3b4a8aa3b8df6e
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
From: "Hector Vergara" <hvergara@quitaelguion.g-mail.com>
Newsgroups: chile.comp.programacion
Subject: Re: script php
Date: Fri, 1 Dec 2006 02:02:26 -0300
Organization: Varios
Lines: 41
Message-ID: <eknun6$jk$1@news.nivel5.cl>
References: <ekni23$sgs$1@news.nivel5.cl> <Xns988BEA82E4EF7jmsnews@200.27.221.71> <eknmh4$tua$1@news.nivel5.cl>
NNTP-Posting-Host: pc-128-222-45-190.cm.vtr.net
X-Trace: news.nivel5.cl 1164934694 628 190.45.222.128 (1 Dec 2006 00:58:14 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Fri, 1 Dec 2006 00:58:14 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180