Start New Discussion within our Web Development Community

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???

This article has been dead for over six months. Start a new discussion instead.