返回列表 發帖

[提問] 請問php-plurk-api裡面get_plurks的回傳值要怎麼處理?

最近在使用php-plurk-api時使用到了get_plurks()這個函式
想請問用過的先進們
get_plurks()他的回傳值要怎麼處理?

例如:
  1. object(stdClass)#35 (2)
  2. { ["plurk_users"]=> object(stdClass)#36 (1)
  3. { ["3625262"]=> object(stdClass)#37 (11)
  4. { ["display_name"]=> string(12) "好攝之徒" ["nick_name"]=> string(9) "jason0318" ["has_profile_image"]=> int(1) ["location"]=> string(14) "Taipei, Taiwan" ["date_of_birth"]=> string(29) "Thu, 18 Mar 1976 00:01:00 GMT" ["avatar"]=> int(8) ["full_name"]=> string(9) "陳阿昇" ["gender"]=> int(1) ["timezone"]=> NULL ["id"]=> int(3625262) ["karma"]=> float(67.63)
  5. }
  6. }["plurks"]=> array(1)
  7. { [0]=> object(stdClass)#38 (18)
  8. { ["lang"]=> string(5) "tr_ch" ["favorers"]=> array(0) { } ["content_raw"]=> string(45) "今天在公司大廳趕走一隻大蟑螂!!!" ["user_id"]=> int(3807491) ["qualifier"]=> string(4) "says" ["plurk_id"]=> int(402041831) ["response_count"]=> int(0) ["favorite"]=> bool(false) ["plurk_type"]=> int(0) ["content"]=> string(45) "今天在公司大廳趕走一隻大蟑螂!!!" ["qualifier_translated"]=> string(3) "說" ["is_unread"]=> int(0) ["responses_seen"]=> int(0) ["posted"]=> string(29) "Fri, 30 Jul 2010 16:09:25 GMT" ["limited_to"]=> NULL ["no_comments"]=> int(0) ["favorite_count"]=> int(0) ["owner_id"]=> int(3625262)
  9. }
  10. }
  11. }
複製代碼
我想要取出content_raw的值的話要怎麼取?
原本是用split來做,可是速度太慢了@@
我的網站:
逐風者
Plurk
Facebook

Regular Expression

TOP

不知道要怎用Regexp來取出字元0.0
我的網站:
逐風者
Plurk
Facebook

TOP

請參考 http://zh.wikipedia.org/zh-hant/正则表达式
如果有需要也可以用這程式先練習

附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

返回列表