开发者

How can I change value of a member of an object called pages.total? PHP

I've got this object, and i want change pages.total

JPagination Object
(
[开发者_JAVA百科limitstart] => 15
[limit] => 5
[total] => 16
[_viewall] => 
[_errors] => Array
    (
    )

[pages.total] => 4
[pages.current] => 4
[pages.start] => 1
[pages.stop] => 4
)

how can I achieve it? Thanks


Assuming the property is public

$object->{'pages.total'} = 'value';


I'm not familiar with JPagination, so I can't tell if it's a private or public property you are tryin to change, but normally you can just do

$ob->total = 10;

If it's a private property you need to change it from within the object with

$this->total = 10;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜