>
> > > -Original Message-----
> > > From: lallous [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, October 07, 2002 6:09 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] join() , can do that fast?
> > >
> > > Hello,
> > >
Thanks John,
sorry I didn't see the new join()'s parameters you provided, I only noticed
the new '%s' .
Elias,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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...
produces:
x=['str1','str2','str3']
Grtz Erwin
--
PHP General Mai
:002101c26de2$982bf7d0$7c02a8c0@coconut...
>
>
> > -Original Message-
> > From: lallous [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 07, 2002 6:09 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] join() , can do that fast?
> >
> >
> -Original Message-
> From: lallous [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 6:09 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] join() , can do that fast?
>
> Hello,
>
>
> I have:
> $x = array('str1','str2',
Hello,
I have:
$x = array('str1','str2','str3');
I want to convert that array to a valid javascript syntax as:
var x = ['str1','str2','str3']
I can do this in PHP:
echo sprintf("x=[%s]", join(',', $x));
but that would produce:
x = [str1, str2, str3]
is there is a fast way (other than doing
6 matches
Mail list logo