dongwu5801 2014-04-10 22:34
浏览 143

从wp_postmeta检索数据

I know this is maybe a dumb question. I am trying to retrieve data from the wordpress table wp_postmeta, specifically the meta_value column. Is there a function in php to get every field from that kind of data?

For example how can I get the "Gabriela Castro en Costa Rica" value from this

a:1:{s:14:"billing-seller";a:3:{s:4:"name";s:14:"billing-seller";s:5:"value";s:29:"Gabriela Castro en Costa Rica";s:5:"label";s:26:"Select one option, please.";}}

Thanks.

  • 写回答

3条回答

  • dongxiaoxiao1983 2014-04-10 22:35
    关注

    This seems like a serialized array, im not familiar with Wordpress but maybe try something like this:

    get_user_meta( '99999', 'your-key', true );
    

    You can find more information to get_user_meta here:

    https://wordpress.stackexchange.com/questions/9716/how-to-retrieve-the-value-stored-in-a-multi-dimensional-array-and-sum-the-entrie

    评论

报告相同问题?

悬赏问题

  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R