ArrayObject::offsetSet

(PHP 5, PHP 7, PHP 8)

ArrayObject::offsetSet为指定索引设定新的值

说明

public ArrayObject::offsetSet(mixed $index, mixed $newval): void

设置指定的索引为新的值

参数

index

将要被设置的索引

newval

参数 index 所对应的新值。

返回值

没有返回值。

范例

示例 #1 ArrayObject::offsetSet() 例子

备份地址:http://www.lvesu.com/blog/php/arrayobject.offsetset.php