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. 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']; 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]; 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. 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 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. Link to comment https://forums.phpfreaks.com/topic/189537-_requestwordvariable-how/#findComment-1000555 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.