Transfer parameter confuses me

Hi guys,
I’m a little surprised at parameter given to method by following code. I assume an integer, but I get an array. Of course, it’s simple to fix it, nevertheless, my intention is to understand, why I will get an array instead an integer. Who knows about it?

public function actionDeleteall() {
    $arrayOfPk = array();
    $model = Mail::find()->all();
    foreach ($model as $item) {
        array_push($arrayOfPk, $item->id);
    }
    for ($i = 0; $i < count($arrayOfPk); $i++) {
        //$arrayOfPk[$i] will  be  integer, as var_dump shows up, but....
        $this->actionDelete([$arrayOfPk[$i]]);
    }
}

…here, I will get an array

public function actionDelete($id) {
        if (is_array($id))
            $id = $id[0];
.
.

Seemingly passing array member as array. (try removing enclosing [ ] )

Ohhh, how stupid of me. Of course, it should be coded like this;

$this->actionDelete($arrayOfPk[$i]);

Thx a lot for ur efforts understanding what went wrong. Salut!