Huijari Posted January 23, 2010 Share Posted January 23, 2010 Hello, so this is my code: $iii=$_REQUEST['iii']; $x_coord=$_REQUEST['word'$iii]; echo "$iii"; echo "$x_coord"; So example: I type url: mysite.com/pathtomyphpfile.php?iii=3&word3=27 Then it should echo: 3 (iii) and 27 (x_coord) Because it should request word+iii so, word3 that is 27 Tell me what I am doing wrong. I hope this is possible because its important for my project. Quote Link to comment https://forums.phpfreaks.com/topic/189537-_requestwordvariable-how/ Share on other sites More sharing options...
TEENFRONT Posted January 23, 2010 Share Posted January 23, 2010 $x_coord=$_REQUEST['word$iii']; Quote Link to comment https://forums.phpfreaks.com/topic/189537-_requestwordvariable-how/#findComment-1000449 Share on other sites More sharing options...
jl5501 Posted January 23, 2010 Share Posted January 23, 2010 $x_coord=$_REQUEST['word'.$iii]; Quote Link to comment https://forums.phpfreaks.com/topic/189537-_requestwordvariable-how/#findComment-1000516 Share on other sites More sharing options...
Daniel0 Posted January 23, 2010 Share Posted January 23, 2010 $x_coord=$_REQUEST['word$iii']; Single quoted strings do not have variable interpolation. Quote Link to comment https://forums.phpfreaks.com/topic/189537-_requestwordvariable-how/#findComment-1000532 Share on other sites More sharing options...
TEENFRONT Posted January 23, 2010 Share Posted January 23, 2010 $x_coord=$_REQUEST["word$iii"]; Any better? lol Quote Link to comment https://forums.phpfreaks.com/topic/189537-_requestwordvariable-how/#findComment-1000547 Share on other sites More sharing options...
Huijari Posted January 23, 2010 Author Share Posted January 23, 2010 Thank you so much jl5501! This really helps me with my project. Quote Link to comment https://forums.phpfreaks.com/topic/189537-_requestwordvariable-how/#findComment-1000555 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.