The following is my jquery code:

```
 e_val = [];
 e_val = ['enroll','reject'];
 $.ajax({
                url: 'myurl.php',
                type: 'post',
                dataType: 'text',
                data: {
                    reason: 'insert',
                    eval: e_val
                },
                success: function (suc) {
                    row.remove();
                    alert(suc);
                }
       });

```

myurl.php:

```
$reason = $_POST['reason'];
$eval = array();
if($reason == "insert"){
     $eval = $_POST['eval'];
     echo $eval[1];
}

```

And the alert I get is:

```
n

```

That's because n is at index value 1 in e\_val[0].
Can I know why is my array converted to string in PHP page and I'm not able to access the array elements?
Thanks in advance.