Article View: chile.comp.programacion
Article #690Re: Mezclar string
From: AlejandroArias
Date: Wed, 05 Mar 2008 20:25
Date: Wed, 05 Mar 2008 20:25
19 lines
1770 bytes
1770 bytes
Hola Jose, muchas gracias por tu pronta respuesta, si es en PHP
Estoy escribiendo esto:
$s1="123";
$s2="567";
$s = '';
for ($i = 0; $i < strlen($s1) && $i < strlen($s2); $i++)
$s .= $s1{$i} . s2{$i};
for ($i < strlen($s1); $i++)
$s .= $s1{$i};
for ($i < strlen($s2); $i++)
$s .= $s1{$s2};
pero me retorna error de
Parse error: syntax error, unexpected '{'
aunque no le estoy poniendo todos los {} lo ensaye con los {} y no
funciona...
Technical Details
Message-ID:
<80a9289e-ea0a-4618-9ccc-170a4a54032e@p73g2000hsd.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!p73g2000hsd.googlegroups.com!not-for-mailReferences:
<3394b760-72db-46a1-a587-80153b21be4c@i29g2000prf.googlegroups.com> <Xns9A58AEBD24FD9jmsnews@201.238.250.229>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,43187c159ac77009 X-Google-Attributes: gid1593cb,public,usenet X-Google-Language: SPANISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!p73g2000hsd.googlegroups.com!not-for-mail From: AlejandroArias <jalejandro0211@gmail.com> Newsgroups: chile.comp.programacion Subject: Re: Mezclar string Date: Wed, 5 Mar 2008 12:25:20 -0800 (PST) Organization: http://groups.google.com Lines: 19 Message-ID: <80a9289e-ea0a-4618-9ccc-170a4a54032e@p73g2000hsd.googlegroups.com> References: <3394b760-72db-46a1-a587-80153b21be4c@i29g2000prf.googlegroups.com> <Xns9A58AEBD24FD9jmsnews@201.238.250.229> 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 1204748721 14370 127.0.0.1 (5 Mar 2008 20:25:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 Mar 2008 20:25:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p73g2000hsd.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)