Here is what I have in PHP:

```
$arrayresults = array();
while($popularbrushesrow = mysql_fetch_array($popularBrushes)){

$arrayresults[]  = '<a href="brushdescription.php?id='.$popularbrushesrow['bd_brushid'].'"><img class="slideImg" alt="'.$popularbrushesrow['bd_brushname'].'" title="'. $popularbrushesrow['bd_brushname'].'" src="'.$popularbrushesrow['bd_imagefilepath'].'"  /></a>';

}

echo json_encode($arrayresults);

```

Now, jquery:

```
$.ajax({
    type:'GET',
    url:'getDataForSlide.php',
    data:"limit="+limit+"&required="+required,
    dataType:"json",
    cache:true,
        success: function(result){
     var arrayFromPHP = JSON.parse(result);
     alert(arrayFromPHP);
  }
})

```

Could someone please help me out. Whats the correct way to form an array in JSON?