Biorąc .get json string, zamieniasz się w tablicę?

Im za pomocą poniższego, aby pobrać ciąg z php, chciałbym wiedzieć, jak zrobić mój ciąg do tablicy.

Jquery

<code>$.get("get.php", function(data){
    alert(data);
    //alert($.parseJSON(data));
}, "json");
</code>

skomentowana sekcja wydaje się nie mieć żadnego efektu, więc nie mogę powiedzieć, co robię źle, czy ktoś mógłby mi doradzić?

W razie potrzeby mogę wysłać PHP.

Dzięki.

PHP

<code><?php

$username="root";
$password="root";
$database="testing";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$name= $_GET['name'];

$query="SELECT * FROM tableone ";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

$array = array();

$i=0;
while ($i < $num) {

    $first=mysql_result($result,$i,"firstname");
    $last=mysql_result($result,$i,"lastname");
    $date=mysql_result($result,$i,"date");
    $ID=mysql_result($result,$i,"id");

    $array[$i] = $first;

    $i++;
}

echo json_encode($array);

?>
</code>

Wydajność:

["James","Lydia","John"]

questionAnswers(2)

yourAnswerToTheQuestion