Start New Discussion Reply to this Discussion Pass variable to url in php
Is this possible to pass the php variable to the url?
my code is:
<?php
$array1 = array("iphone", "ipad","iMac");
for($test = 0; $test <= 2; $test++)
{
echo '<a href="https://www.google.com?$array1[$test]">Click me</a><br />';
}
?>
How do i do that when i click on the link it will show the search results???
Related Article: Help me convert xml to php array
is a solved PHP discussion thread by javedshaikm that has 5 replies, was last updated 10 months ago and has been tagged with the keywords: xml, php, array, to.
zeeshanmughal
Newbie Poster
8 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Biiim
Posting Pro
504 posts since Oct 2011
Reputation Points: 104
Solved Threads: 83
Skill Endorsements: 7
Now what is the output of the above code?
Karthik_pranas
Posting Pro
571 posts since Feb 2011
Reputation Points: 96
Solved Threads: 101
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.0664 seconds
using 2.76MB