开发者

How to use array values in another array

My Facebook app publishes a story to the user wall with an http post:

$args = array('access_token' => $ACCESS_TOKEN,
              'message' => 'testing message',
              'picture' => $appin_logo,
              'link' => $appin_canvas_url,
              'na开发者_StackOverflowme' => $appin_name,
              'caption' => $post_score,
              'description' => $post_rfs,
              );
               $ch = curl_init();  $url = 'https://graph.facebook.com/me/feed';  curl_setopt($ch, CURLOPT_URL, $url);  curl_setopt($ch, CURLOPT_HEADER, false);  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  curl_setopt($ch, CURLOPT_POST, true);  curl_setopt($ch, CURLOPT_POSTFIELDS, $args);  $data = curl_exec($ch);  curl_close($ch);

That works all fine, except for one thing: $post_rfs is an array. I'd like to output its values in a neat way, with a comma after every value i.e.. What should I do?

Thanks in advance.


Try this:

implode(', ', array_values($post_rfs));
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜