injquery展开和折叠+;php

injquery展开和折叠+;php,php,javascript,jquery-ui,jquery,Php,Javascript,Jquery Ui,Jquery,嗨,我正在执行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,并在单

嗨,我正在执行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>
$(文档).ready(函数(){

//使用类msg_body隐藏所有元素 $(“.msg_body”).hide(); //使用类msg_body切换组件网 $(“.msg_head”)。单击(函数(){ $(this).next(“.msg_body”).slideToggle(600);
您的代码确实进行了一些小改动。。。
.

//用类msg_body$(“.msg_body”)(“.msg_body”)隐藏所有元素。hide();//用类msg_body$(“.msg_head”)切换componenet。单击(函数(){$(this)。下一步(“.msg_body”)。滑动切换(600);是的,我尝试了,但无法传递唯一值并获得结果。