按下按钮后包括php页面

we have four buttons with same name button1 in a for loop . If we press even one button php page has to be loaded for this we use isset function , but the coding is not working properly in the desired manner kindly help...

<!DOCTYPE html>
<html>
<head>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
<script>
  $(document).ready(function(){
  $('.myButton').click(function() {
    var $ct = $(this).next("div.container");
    if (this.value == 'collapse') {
  this.value = 'expand';
  $ct.hide("slow");
 $('.myButton').parent().show("slow");
    } else {
  this.value = 'collapse';
  $ct.show("slow");
 $('.myButton').not($(this)).parent().hide("hide");
    }

  });
});
</script>



</head>
<body>
<?php
for($i=0;$i<=3;$i++)
{
echo"<div class='main' style='position:relative;border:1px solid #A5BEBE;background-        color:#E7EFEF;width:84%;  '> 
<b> sometext:-</b><a href='#'>$url</a><br>
<b>sometext :</b>$b<br>
</p>
<input type='button' value='expand' class='myButton'  name='button1' target='".$i."'       onclick='clickButton(this)'        style='position:absolute;left:85%;top:4%;background:#B20000;color:white;width:70px;height:20px;font-        size:15px;' >";

echo "<div  class='container'  style='display:none;background:white; '>

  <b> sometext:-</b><a href='#'>$url</a><br>
<b>sometext :</b>$b<br>
<b>sometext :</b>$c<br>
</p>";
if(isset($_GET['button1']))
{ 
echo"<script>alert('msg1');</script>";
include('function.php'); 
} 
echo "</div>";

echo "</div>";

}
?>

</body>
</html>

in the above code the alert message is not appearing . this alert should be called on pressing each button respectively...

I think you are missing the fact that php and javascript (or jquery in this occasion) are executed in two completely different moments. The former is executed by the server and the output is sent to the client (browser) who will execute the later. So I don't think your alert will be shown because, unless $_GET["button1] is defined through a get call of the webpage, the code won't even exist for the client.