delphi mysql query result

for read data from database server im using mysql query like this:

FDQuery1.SQL.Text := 'select * from `table` WHERE dcid=3;';
memo1.Lines.Add( FDQuery1.FieldByName('value').AsString );

but when i have to use a loop for read data from mysql

i need a array to read and store data on it

i know in php its like this

$arr = array();
while($obj = $q->fetch_object() ){
    $arr[] = $obj;

but how can i do this syntax in Delphi ?