How to change the array in following scenario?

PHPLover

I've an SQL query as follows:

SELECT test_user_user_id FROM OCN.tests_users WHERE test_user_test_id = 99
$this->mDb->Query( $sql );
$students_data = $this->mDb->FetchArray();

I get the array as follows:

Array
(
    [0] => Array
        (
            [test_user_user_id] => b9e6493f9f8599bc5a0a5935275228c2
        )

    [1] => Array
        (
            [test_user_user_id] => 395599c5891c1418357e2efa89bc3e27
        )

    [2] => Array
        (
            [test_user_user_id] => 3255605bb9fd3ecc0295a1bfb3cba147
        )

    [3] => Array
        (
            [test_user_user_id] => ebe6711fc156b2cc1a33f64f3d86150f
        )

    [4] => Array
        (
            [test_user_user_id] => 627b9c3f21d93f1e13af076cff20b143
        )

    [5] => Array
        (
            [test_user_user_id] => 030e96561c01afde1c46384f57cf8749
        )

    [6] => Array
        (
            [test_user_user_id] => 9def02e6337b888d6dbe5617a172c18d
        )
)

Actually I want the array in following format:

Array
    (

                [0] => b9e6493f9f8599bc5a0a5935275228c2

                [1] => 395599c5891c1418357e2efa89bc3e27

                [2] => 3255605bb9fd3ecc0295a1bfb3cba147

                [3] => ebe6711fc156b2cc1a33f64f3d86150f

                [4] => 627b9c3f21d93f1e13af076cff20b143

                [5] => 030e96561c01afde1c46384f57cf8749

                [6] => 9def02e6337b888d6dbe5617a172c18d

    )

How to get the array in above format?

Ganz
$resArray = Array();
foreach($myArr as $_arr)
{
   $resArray[] = $_arr['test_user_user_id'];
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to manipulate the array in following scenario?

From Dev

How to create an inner array inside parent array in following scenario?

From Dev

How to print associative array data in a Smarty template in following scenario?

From Dev

How to remove \' from each array element in following scenario?

From Dev

How to get result in following scenario

From Dev

How to get result in following scenario

From Dev

How to deal with following scenario in QTP?

From Dev

How to shift array elements from associative array by one in following scenario in PHP?

From Dev

How to use RethinkDB indices in the following scenario?

From Dev

How would I improve the performance in the following scenario

From Dev

How to use threading or Task pattern in following scenario

From Dev

How to use expandable list view in the following scenario

From Dev

How to show the groupwise result for the following scenario?

From Dev

How to make the checkbox working properly in following scenario?

From Dev

how to make a left outer join in following scenario

From Dev

How to use threading or Task pattern in following scenario

From Dev

How to avoid duplicates in following SQL scenario

From Dev

How to apply conditional aggregation in SQL the following scenario?

From Dev

How to check presence of a certain value in inner array and fetch some other value from the same inner array in following scenario?

From Dev

How to check presence of a certain value in inner array and fetch some other value from the same inner array in following scenario?

From Dev

Why I'm not getting the updated array in following scenario?

From Dev

What's the issue in accessing associative array element in smarty in following scenario?

From Dev

Why the logic for array conversion and HTML parsing is not working in following scenario?

From Dev

How to implement autocomplete functionality using PHP, jQuery and AJAX in following scenario?

From Dev

How to use create event on a jQuery dialog in following scenario?

From Dev

SQL How to join two tables to get records in following scenario?

From Dev

How to assign unique id to each select box for the following scenario

From Dev

How to click a parent element using the child element for the following scenario

From Dev

How to call a jQuery function on click event in the following scenario?

Related Related

  1. 1

    How to manipulate the array in following scenario?

  2. 2

    How to create an inner array inside parent array in following scenario?

  3. 3

    How to print associative array data in a Smarty template in following scenario?

  4. 4

    How to remove \' from each array element in following scenario?

  5. 5

    How to get result in following scenario

  6. 6

    How to get result in following scenario

  7. 7

    How to deal with following scenario in QTP?

  8. 8

    How to shift array elements from associative array by one in following scenario in PHP?

  9. 9

    How to use RethinkDB indices in the following scenario?

  10. 10

    How would I improve the performance in the following scenario

  11. 11

    How to use threading or Task pattern in following scenario

  12. 12

    How to use expandable list view in the following scenario

  13. 13

    How to show the groupwise result for the following scenario?

  14. 14

    How to make the checkbox working properly in following scenario?

  15. 15

    how to make a left outer join in following scenario

  16. 16

    How to use threading or Task pattern in following scenario

  17. 17

    How to avoid duplicates in following SQL scenario

  18. 18

    How to apply conditional aggregation in SQL the following scenario?

  19. 19

    How to check presence of a certain value in inner array and fetch some other value from the same inner array in following scenario?

  20. 20

    How to check presence of a certain value in inner array and fetch some other value from the same inner array in following scenario?

  21. 21

    Why I'm not getting the updated array in following scenario?

  22. 22

    What's the issue in accessing associative array element in smarty in following scenario?

  23. 23

    Why the logic for array conversion and HTML parsing is not working in following scenario?

  24. 24

    How to implement autocomplete functionality using PHP, jQuery and AJAX in following scenario?

  25. 25

    How to use create event on a jQuery dialog in following scenario?

  26. 26

    SQL How to join two tables to get records in following scenario?

  27. 27

    How to assign unique id to each select box for the following scenario

  28. 28

    How to click a parent element using the child element for the following scenario

  29. 29

    How to call a jQuery function on click event in the following scenario?

HotTag

Archive