php页面:<?php include 'open51094.class.php'; $open = new open51094(); $code = $_GET['code']; var_dump( $open->me($code) ); ?>
浏览器输出:array(5) { ["name"]=> string(6) "师兄" ["img"]=> string(70) "http://q.qlogo.cn/qqapp/100378832/911BD93454C7ECE9FACB7E9E9FD1C00B/100" ["sex"]=> int(1) ["uniq"]=> string(13) "qq3vSbh843LGI" ["from"]=> string(2) "qq" }
php gets an array as follows, how to echo the value inside? For example, the value of "name" - PHP Chinese website Q&A - PHP gets an array as follows, how to echo the value inside? For example, the value of "name" - PHP Chinese website Q&A
Take a look and learn.
echo $open->me($code)['name'];