Php 链接中出现意外的T_回音?
我对php中的echo有一个小问题Php 链接中出现意外的T_回音?,php,json,Php,Json,我对php中的echo有一个小问题 if (isset($_GET['id']) && is_numeric($_GET['id'])) { $id = $_GET['id']; // copy file content into a string var $json_file = file_get_contents('link.com?id_select='echo $id;'); 如何在链接中显示GET ID的值 谢谢您需要使用串联,您可以使用这样的点: $json_f
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
$id = $_GET['id'];
// copy file content into a string var
$json_file = file_get_contents('link.com?id_select='echo $id;');
如何在链接中显示GET ID的值
谢谢您需要使用串联,您可以使用这样的点:
$json_file = file_get_contents('link.com?id_select='.$id);
谢谢,因为你做得不正确。请这样做:
index.php?id_select='.$id.&op_select
下次在问题中添加整个url。很抱歉,下次我会记住它。谢谢你的帮助,我马上就去看医生:)