<?php for ($i = 0, $total = count($query1->v); $i < $total; $i ++) echo "\n array[$i] = '".$query1->v[$i]->fecha."';"; ?>