Re: join() , can do that fast?

From: Date: Mon, 07 Oct 2002 10:37:21 +0000
Subject: Re: join() , can do that fast?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-119061@lists.php.net to get a copy of this message
Lallous wrote: > John, what you said would simply produce: > var x = ['str1,str2,str3'] > and not as I want: > var x = ['str1','str2','str3'] Elias, did you actually tried that? Because it does produce what you want... <? $x = Array( 'str1', 'str2', 'str3' ); echo sprintf("x=['%s']", join("','", $x)); ?> produces: x=['str1','str2','str3'] Grtz Erwin

« previous php.general (#119061) next »