Question: i want to generate loop of javascript in php which give me syntax error.here is what i want

```
var d1 = [
          [(new Date("01/06/2013")). getTime(),4],
          [(new Date("01/07/2013")). getTime(),0],
         ];

```

i want to make it dynamic from db.here is what i tried

```
var d1 = [
<?php
    while($rw = $oAppl->row($res))
    {
        $php_var = $rw['list_date_rent'];
        $php_var2 = $rw['rntval'];
?>            
    var php_var = "<?php echo $php_var; ?>";
    var php_var2 = "<?php echo $php_var2; ?>";
    [(new Date("+'"php_var"'+")). getTime(),php_var2],
<?php
    }
?>
];

```

Answer: 
You don't need to explicitly delete the `JSESSIONID` cookie like this. It is not managed by Spring Security as such, but by your servlet container. Spring Security will by default invalidate the http session upon logout, which in turn causes your servlet container to remove the `JSESSIONID` cookie.
This is how I invalidate sessions:  

```
<security:logout invalidate-session="true" logout-success-url="/myapp/auth/login" logout-url="/myapp/auth/logout" />

```