Re: [請益] 有關$_GET[]函數...

看板PHP作者 (亨ちゃんは可愛い>/////<)時間18年前 (2006/05/09 20:09), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
※ 引述《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
文章代碼(AID): #14O8Phz- (PHP)
文章代碼(AID): #14O8Phz- (PHP)