Imoddedu Posted June 6, 2011 Share Posted June 6, 2011 I see URL's like this all the time:index.php?k=4(the k doesn't mean anything, just representing anything that can go there.what exactly does this mean in terms of PHP? Also, how is it used for things like looking up information in a search box and displaying the result? like ?result=blahblahblah Link to comment Share on other sites More sharing options...
justsomeguy Posted June 6, 2011 Share Posted June 6, 2011 PHP has access to those values in the $_GET array:http://www.w3schools.com/php/php_get.asp Link to comment Share on other sites More sharing options...
Imoddedu Posted June 7, 2011 Author Share Posted June 7, 2011 thanks! short and simple explanation that I understood :)which leads to another question...:how come in this code while($row = mysql_fetch_array($result)) { echo $row['title']; echo "<br />"; echo "<br />"; echo $row['response']; } I tried putting [ echo "<h4>$row['title']</h4>"; but it actually put out $row['title'] the variable name, not it's value. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 7, 2011 Share Posted June 7, 2011 Check the manual about string parsing, look at the complex syntax for putting associative arrays in strings:http://www.php.net/manual/en/language.type....string.parsing Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.