mmm, tendrias que hacer mejor una funcion, para eso son:
Código PHP:
function algo() {
$x = "SELECT * FROM prueba";
$xx = mysql_db_query($base,$x) or die (mysql_error());
while($xxx = mysql_fetch_array($xx))
{
echo "".$xxx["prueba2"]."";
}
}
// mas abajo..
algo();
Saludos.