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

    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集