Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 JavaScript 变量添加到 php echo
arr[i]='<?php echo $winner[javascript variable]; ?>';
谢谢
你不能。
执行 JavaScript 时,PHP 已完成运行。
如果你想传回数据,你需要发出一个新的HTTP 请求并从头开始运行一个 PHP 脚本。