2011-04-19 98 views
0

正在試圖通過hrough URL中的值,但是當我找回它看起來像這樣「進行urlencode(15.99),」重定向進行urlencode問題

值是正確的,但我已經嘗試不同的東西,但仍無法只發送沒有urlencode或添加語法的值 正在嘗試發送該值的代碼行是

redirect_to(「$ the_file_is?subj ='。urlencode($ the_price_is)'」);

回答

0

這應該做你要找什麼,假設我理解正確的話: redirect_to($the_file_is . '?subj=' . urlencode($the_price_is));

0

當然只是改變......

redirect_to($the_file_is."?subj=" . urlencode($the_price_is)); 
+0

感謝有新的PHP有時我忘記了基礎知識,所以再次感謝 – percy 2011-04-19 11:12:25

+0

沒有後顧之憂,碰巧給大家! – GordyD 2011-04-19 11:25:48

0

幾乎沒有 - 報價混亂的只是一點點:)

redirect_to("$the_file_is?subj=" . urlencode($the_price_is));

值得一提的是,你可以在鬥引用變量可以引用如下:

echo "hello $name";會工作,但echo "$actioned";可能需要爲echo "{$action}ed"; echo $action.'ed';,具體取決於。

+0

謝謝skipychalmers php有時看起來好像學了很多東西學習 – percy 2011-04-19 18:53:09

+0

沒問題;)我知道你的意思! – 2011-04-20 12:57:20