Question: This seemed simply but i'm running into a problem. I'm building an autocomplete drop down box using jquery ui. It works fine with static information but when i try put dynamic data from mysql in the array it freaks out.

Parse error: syntax error, unexpected T\_DO, expecting ')' on line 46

Line 46 is the do in the array

```
$items = array(do {    
    $row_Recordset1['ARTIST'];
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); );

```

I've searched the net but I can't find anything relating to problems with a do in an array.

Sorry if this is really stupid but I can't seem to get it to work

Thanks

Answer: 
You can't execute code inside an array statement. Please read the manual for the [array](http://il.php.net/manual/en/function.array.php) method. It excepts values , not code.

You should initialise your array , and then use your do/while loop to populate data. 

```php
$items = array();

do{
    $items[] = $row['artist'];
}while('condition');

```
Your code should be like below, even should not use `do ... while` loop.

```
while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)) {
   $items[] = $row_Recordset1 ['ARTIST'];
}

```