Ver original$buscar = mysql_query("SELECT * FROM clientes"); $campos = mysql_fetch_field($buscar); $data = array(); foreach ($campos as $k => $v) { $data []= "$k = '$v'"; } echo join(', ', $data); // a = 'b', x = 'y'