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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to