Q:

Loop through Resultset in php

I am new to php and i am using PDO for db operations
through a query i get the result set which is printed using print_r() function 
Output looks like
Array
(
[0] => Array
    (
        [selection_id] => 8947562
        [price_difference] => 1.02
        [one_miniute_price] => 4.20
        [one_min_pc] => 0.2381
    )

[1] => Array
    (
        [selection_id] => 8801685
        [price_difference] => 1.00
        [one_miniute_price] => 13.50
        [one_min_pc] => 0.0741
    )

[2] => Array
    (
        [selection_id] => 9464307
        [price_difference] => 1.00
        [one_miniute_price] => 11.00
        [one_min_pc] => 0.0909
    )

[3] => Array
    (
        [selection_id] => 9066075
        [price_difference] => 0.99
        [one_miniute_price] => 1.99
        [one_min_pc] => 0.5025
    )

[4] => Array
    (
        [selection_id] => 8726674
        [price_difference] => 0.95
        [one_miniute_price] => 10.50
        [one_min_pc] => 0.0952
    )

)

Now my problem is that i want to loop though this output and access the columns for each record
Any help is highly appreciated
regards

A:

foreach($array as $result) {
    echo $result["selection_id"];
}

