smonkcaptain Posted March 31, 2011 Share Posted March 31, 2011 Hey All. Say someone was searching my photo database website from a drop down menu. They search for the aircraft: 'Boeing 747' and airline: 'British Airways', which is posted with the url 'result.php?aircraft=Boeing+747&airline=British+Airways'. How would i get my php to echo: Your search for 'Boeing 747 > British Airways' is displayed below: Or if the search was for just: Aspect: Flightdeck, echo: Your search for 'Flightdeck' is displayed below: I hope it's clear, Thanks, Jimmy Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted March 31, 2011 Share Posted March 31, 2011 if(!empty($_GET)) { echo htmlentities(implode(' > ', $_GET)); } Quote Link to comment Share on other sites More sharing options...
smonkcaptain Posted March 31, 2011 Author Share Posted March 31, 2011 if(!empty($_GET)) { echo htmlentities(implode(' > ', $_GET)); } Thanks! At the moment it's displaying as so: How can I get it so that the '>' is not bold, and also it how can i echo 'for' before the 'Airbus > Monarch'. Thanks! Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted March 31, 2011 Share Posted March 31, 2011 You haven't show the code you use to echo that so I have no idea. Quote Link to comment Share on other sites More sharing options...
smonkcaptain Posted March 31, 2011 Author Share Posted March 31, 2011 You haven't show the code you use to echo that so I have no idea. Sorry, completly forgot: <?php if(!empty($_GET)) { $criteria= htmlentities(implode(' > ', $_GET)); }?> <p class="resulttext">Your search <strong><?php echo $criteria;?></strong> returned <strong><?php echo $num;?></strong> photo results, these are displayed below.</p> Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted March 31, 2011 Share Posted March 31, 2011 $criteria =implode('</strong> > <strong>', array_map('htmlentities', $_GET)); I would just insert the word "for" after "Your search" in the HTML. Quote Link to comment Share on other sites More sharing options...
smonkcaptain Posted March 31, 2011 Author Share Posted March 31, 2011 $criteria =implode('</strong> > <strong>', array_map('htmlentities', $_GET)); I would just insert the word "for" after "Your search" in the HTML. Thanks for that mate that's done it! I could put 'for' before using HTML, however if there is no search criteria is would make no sense; ie. Your search for returned X photo results, these are displayed below. Thanks! Quote Link to comment Share on other sites More sharing options...
smonkcaptain Posted March 31, 2011 Author Share Posted March 31, 2011 $criteria =implode('</strong> > <strong>', array_map('htmlentities', $_GET)); I would just insert the word "for" after "Your search" in the HTML. Thanks for that mate that's done it! I could put 'for' before using HTML, however if there is no search criteria is would make no sense; ie. Your search for returned X photo results, these are displayed below. Thanks! Sorted now, thanks anyway! Quote Link to comment 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.