parse_str看看???查查手册就知道这个函数了!它会按顺序把你的ID分为$str[id][0]之类的~不过,仍然建议不要用一样的分类~免得到时候自己都搞不清~

解决方案 »

  1.   

    parse_str
    (PHP 3, PHP 4 )parse_str -- Parses the string into variables
    Description
    void parse_str ( string str [, array arr])
    Parses str as if it were the query string passed via a URL and sets variables in the current scope. If the second parameter arr is present, variables are stored in this variable as array elements instead. 注: Support for the optional second parameter was added in PHP 4.0.3. 注: To get the current QUERY_STRING, you may use the variable $_SERVER['QUERY_STRING']. Also, you may want to read the section on variables from outside of PHP. 例子 1. Using parse_str()<?php
    $str = "first=value&arr[]=foo+bar&arr[]=baz";
    parse_str($str);
    echo $first;  // value
    echo $arr[0]; // foo bar
    echo $arr[1]; // bazparse_str($str, $output);
    echo $output['first'];  // value
    echo $output['arr'][0]; // foo bar
    echo $output['arr'][1]; // baz?>  
     
      

  2.   

    replace或者php中有没有类似asp中的replace这样的函数
      

  3.   

    这是个音乐连续播放程序,我只要获取ID,你可以选择专集中的某些,也可以是全部,所以要获取的id不确定有几个,所以,就用javascript自动判断递交所选择的id,然后就是如何把这些获取到的ID拆分开了!
      

  4.   

    若123.php?id=64362&id=64358&id=63957&id=61846&id=60581

    $str = $_SERVER['QUERY_STRING'];
    $str = str_replace("=","[]=",$str);
    parse_str($str);
    print_r($id);