tfenrich Posted February 17, 2008 Share Posted February 17, 2008 Alright, Heres the deal, I have basically been searching for the code to use php to use the code like = index.php?pagename, how do i do this, I can't for the life of me figure it out, can you help? Link to comment https://forums.phpfreaks.com/topic/91525-using-phpsomething-code-help/ Share on other sites More sharing options...
Chris92 Posted February 17, 2008 Share Posted February 17, 2008 There are several ways of doing this, the simplest would be to use the $_GET method: Eg. index.php?q=Hello%20World <?php echo $_GET['q']; //Will return Hello World ?> You can also do it by simple setting the query string into an array: Eg, index.php?Hello,World <?php $array = explode(",", $_SERVER['QUERY_STRING']); $string = implode(" ", $array); echo $string; ?> Link to comment https://forums.phpfreaks.com/topic/91525-using-phpsomething-code-help/#findComment-468807 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.