亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Positional parameters cannot be used after named parameters |yiyi2
P粉158473780
P粉158473780 2024-03-26 14:44:20
0
1
595

I am taking the Yii2 PHP framework course and I encountered a problem. I'm not very familiar with PHP so I'm having a hard time figuring this out.

So I tried to create a "Delete" button in my website but I got the error: "Cannot use positional parameters after named parameters".

There are code snippets:

'class' => 'yii\grid\ActionColumn',
'buttons' => [
    'delete' => function ($url) {
        return Html::a(text:'Delete', $url, [
            'data-method' => 'post'
        ]);
    }
]

P粉158473780
P粉158473780

reply all(1)
P粉333186285

This is not a Yii2 issue, if you check the php documentation page it talks about this case, it says:

This makes sense, if PHP lets you put named parameters first and then positional parameters, there's no way to determine which parameters should match the unnamed parameters you actually pass.

In the opposite case, the first positional argument root

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template