PHP二维数组输出
把定义好数组后按URL传值的结果输出数组。如接收传值name=baidu,则按html格式输出baidu数组。请问如何实现?
<br /><?php<br /> $b-title = baidu;<br /> $b-keyword = search;<br /> $b-content = baidu search; <br /> $g-title = google;<br /> $g-keyword = search;<br /> $g-content = google search; <br />$baidu=array('baidu'=>array('$b-title','$b-keyword','$b-content'));<br />$google=array('google'=>array('$g-title','$g-keyword','$g-content'));<br />?><br /><br />输出:<br /><html><br /> <head><br /> <title></title><br /> <meta name="keywords" content="" /><br /> </head><br /> <body><br /> <br /> </body><br /></html><br />
$b_title = 'baidu';<br /> $b_keyword = 'search';<br /> $b_content = 'baidu search'; <br /> $baidu = array('b-title'=>$b_title,'b-keyword'=>$b_keyword,'b-content'=>$b_content);<br /> echo http_build_query($baidu);