こんにちは、mysql クエリを実行して、以下の結果を得ています。
Array
(
[0] => 131.208.0.0
[1] => 141.128.0.0
[2] => 141.129.0.0
[3] => 155.182.0.0
[4] => 155.183.0.0
)
jquery expand を使用して、以下のように印刷する必要があります。 + をクリックすると、展開されて以下の値が表示されます。UI +131、+141、および +151 に固有の値を表示しています。そして、これらの値を php に渡し、クリックしたときに結果を取得する必要があります。
-131.0.0.0
-131.208.0.0
-141.0.0.0
-141.1298.0.0
-141.129.0.0
+155.182.0.0
私のコード
$(document).ready(function(){
//hide the all of the element with class msg_body
$(".msg_body").hide();
//toggle the componenet with class msg_body
$(".msg_head").click(function(){
$(this).next(".msg_body").slideToggle(600);
<div class="msg_body">
<?php
$octets = $this->Ip;
foreach($octets as $octet){
//echo "+".$octet."<br />";
}
// Here display unique octet value.
$octetets = $this->octent1;
foreach($octetets as $octet){
echo "+".$octet."<br />";
}
?>
</div>