Alexey Zakhlestin wrote: > On 12/2/07, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: >> The \u syntax is specific to JSON, yes. > > \u syntax is specific to javascripts string literals, regular > expressions and identifiers[1] > And JSON is not the only way to deliver data into javascript. Manual > approaches are still useful
Since JSON and Javascript are synonymous, sure, \u is for javascript string literals. I thought you meant whether it was useful outside of Javascript. And I disagree with your second statement. Why wouldn't you use json anytime you wanted to jump from PHP to Javascript? <script> var a = <?php echo json_encode($a)?>; </script> That ensures that no matter what $a is on the PHP side, it will be correctly assigned to the corresponding Javascript variable. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php