Q:

How to convert string to an array

How can i convert string ids 
$ids = '8552479333,8552438544,';

to look like an array
["8552479333","8552438544"]
I tryed :
$ids = (explode(",",$ids,-1));

but this gives me :
Array ( [0] => 8552479333 [1] => 8552438544)

A:

This is a very specific way of formatting. You could miss use the json encoding routines to get the exact result you are looking for: 
<?php
$ids = '8552479333,8552438544,';
$string = json_encode(explode(',', $ids, -1));
var_dump($string);

The output obviously is: 
string(27) "["8552479333","8552438544"]"

