※ 引述《lightskyor (Alien)》之銘言:
: 請問大家一個問題,在PHP中若要讀取前一網頁中的form選單中的資料,可利用
: $_GET['name']來使用(在method=get之下)
: 這個「name」是前一個網頁(a.htm)的變數名稱,
: 那請問,如果在處理的程式中(b.php),若想要利用一個變數來代替name,
: ex.$temp=name
: 是否可以利用$_GET[' ']結合$temp的方式將前一網頁的資料讀取出來呢?
: 請解益,謝謝^^
sample:
<?php
$var=1;
$name="var";
$q=$$name;
$r=${$name};
echo "${$name},$q,$r";
?>
output:
1,1,1
--
'Oh, Harry, dont't you see?' Hermione breathed. 'If she could have done
one thing to make absolutely sure that every single person in this school
will read your interview, it was banning it!'
---'Harry Potter and the order of the phoenix', P513
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.30.84