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