Article View: chile.comp.programacion
Article #1238Re: script php
From: RobertoCL
Date: Fri, 01 Dec 2006 09:12
Date: Fri, 01 Dec 2006 09:12
49 lines
2212 bytes
2212 bytes
Jos� Miguel Santib��ez wrote:
> En el cap�tulo anterior (news:eknmh4$tua$1@news.nivel5.cl), "RobertoCL"
> <rcl2020NOSPAM@hotmail.com> dijo:
>> "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...
> sorry, se me olvid� el detallito:
> for ($i=0; $i<100;$++){
> if ($i % 20 == 0) echo "$i ";
> }
> ah� si...
> 0 20 40 60 80
Gracias ;)
Mi ejemplo funciona hasta cierto n�mero :)
--
RCL
Technical Details
Message-ID:
<fcb26a7f5b5756337377fe853b680624$1@usenet.no-ip.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mailReferences:
<ekni23$sgs$1@news.nivel5.cl> <Xns988BEA82E4EF7jmsnews@200.27.221.71> <eknmh4$tua$1@news.nivel5.cl> <Xns988BF3D2167EAjmsnews@200.27.221.71>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!news3.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail From: rcl2020NOSPAM@hotmail.com (RobertoCL) Newsgroups: chile.comp.programacion Subject: Re: script php Date: Fri, 1 Dec 2006 09:12:31 +0000 (UTC) Organization: Usenet Chile.* http://usenet.no-ip.com Lines: 50 Message-ID: <fcb26a7f5b5756337377fe853b680624$1@usenet.no-ip.com> References: <ekni23$sgs$1@news.nivel5.cl> <Xns988BEA82E4EF7jmsnews@200.27.221.71> <eknmh4$tua$1@news.nivel5.cl> <Xns988BF3D2167EAjmsnews@200.27.221.71> NNTP-Posting-Host: pc-5-28-104-200.cm.vtr.net Mime-Version: 1.0 X-Trace: news.nivel5.cl 1164964351 8050 200.104.28.5 (1 Dec 2006 09:12:31 GMT) X-Complaints-To: news@news.nivel5.cl NNTP-Posting-Date: Fri, 1 Dec 2006 09:12:31 +0000 (UTC) User-Agent: NewsPortal/0.3X RCL MOD X-Abuse: rcl@dmix.ws X-HTTP-Posting-Host: cclh-146-162.cl.impsat.net