Trying to get property of non-object - CodeIgniter

后端 未结 3 1043
小鲜肉
小鲜肉 2020-11-29 06:37

I\'m trying to make update form, that is going to retrieve the data for the specific ID selected, and fill in the form, so its going to be available for updating.

Wh

3条回答
  •  死守一世寂寞
    2020-11-29 07:10

    To access the elements in the array, use array notation: $product['prodname']

    $product->prodname is object notation, which can only be used to access object attributes and methods.

提交回复
热议问题