Article View: chile.comp.programacion
Article #525Re: Mezclar string
From: AlejandroArias
Date: Wed, 05 Mar 2008 20:56
Date: Wed, 05 Mar 2008 20:56
14 lines
1691 bytes
1691 bytes
Listo Tkx
$string1 = '1235';
$string2 = '67829';
$length = strlen($string1) > strlen($string2) ? strlen($string1) :
strlen($string2);
$newstring = '';
for($i = 0; $i < $length; $i++){
if(isset($string1{$i})) $newstring .= $string1{$i};
if(isset($string2{$i})) $newstring .= $string2{$i};
}
echo $newstring;
}
Technical Details
Message-ID:
<2bb9b53b-5593-4dae-8090-fb53244b760a@e25g2000prg.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!e25g2000prg.googlegroups.com!not-for-mailReferences:
<3394b760-72db-46a1-a587-80153b21be4c@i29g2000prf.googlegroups.com> <Xns9A58AEBD24FD9jmsnews@201.238.250.229> <80a9289e-ea0a-4618-9ccc-170a4a54032e@p73g2000hsd.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,43187c159ac77009 X-Google-Attributes: gid1593cb,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!e25g2000prg.googlegroups.com!not-for-mail From: AlejandroArias <jalejandro0211@gmail.com> Newsgroups: chile.comp.programacion Subject: Re: Mezclar string Date: Wed, 5 Mar 2008 12:56:37 -0800 (PST) Organization: http://groups.google.com Lines: 14 Message-ID: <2bb9b53b-5593-4dae-8090-fb53244b760a@e25g2000prg.googlegroups.com> References: <3394b760-72db-46a1-a587-80153b21be4c@i29g2000prf.googlegroups.com> <Xns9A58AEBD24FD9jmsnews@201.238.250.229> <80a9289e-ea0a-4618-9ccc-170a4a54032e@p73g2000hsd.googlegroups.com> NNTP-Posting-Host: 64.86.224.4 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1204750598 18392 127.0.0.1 (5 Mar 2008 20:56:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 Mar 2008 20:56:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e25g2000prg.googlegroups.com; posting-host=64.86.224.4; posting-account=vKxFJwoAAAAEGcMnwa1Tzfw1Y5ZC4W9Q User-Agent: G2/1.0 X-HTTP-Via: 1.1 SBBOGSIS1 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9,gzip(gfe),gzip(gfe)