PHP filters multidimensional arrays, what to do with

Source: Internet
Author: User
PHP Filtering multidimensional arrays
Array (
[0] = = Array (
[Isxinx] = 1
[Rate] = 0.000
[QS] = 177 Forecast
[CB] = 20
[Title] = "Code to Success" welfare lottery 3d177 period test machine number before confidence forecast
[id] = 4137166
[UserID] = 22843
[Childtype] = before the test machine number
[Mfarticleid] = 0
[author] = = to Success
[Pubtime] = 2012-07-23 14:18:30
[Cptypeid] = 2
[Jtpath] =
[num] = 2
[Ltitle] = historical results
[PM] = 10001)
[1] = = Array (
[Isxinx] = 1
[Rate] = 0.000
[QS] = 177 Forecast
[CB] = 20
[Title] = "Code to Success" welfare lottery 3d177 period test machine number before confidence forecast
[id] = 4137166
[UserID] = 22843
[Childtype] = before the test machine number
[Mfarticleid] = 0
[author] = = to Success
[Pubtime] = 2012-07-23 14:18:30
[Cptypeid] = 2
[Jtpath] =
[num] = 2
[Ltitle] = historical results
[PM] = 10001))

I now want to take QS, CB, title, ID, userid, author, ltitle
Data for these seven fields! Excuse me, how do you filter out the others?

------Solution--------------------
foreach ($arr as $v)
$ar []=array (' qs ' = $v [' QS '],...............);

Print_r ($ar);
------Solution--------------------
The last reply is correct!
The source of the watch seems to be derived from the repository, the best way to do this is to write the name of the field, and avoid using SELECT *
SQL Code
Select Qs,cb,title,id,userid,author,ltitle from table
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.