开发者

Wordpress Update Option is setting value as Simple XML Help

I am trying to store an option value in the wp_options table by using update_option, however it goes in as SimpleXML Object when all I want is a normal string of numbers/letters...

I have this:

$id = '1f84705816652deccc97a开发者_开发知识库53acd21b86bcf91f264';

update_option('box_id', $id);

So now I can't pull this value out by using $id = get_option('box_id'); because it is a simpleXML object...

Anyone know?


Ok I just fixed it by type casting it like so: update_option('box_id'(string)$id);

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜