Assume that I have a URL like this
http://subdomain.domain.com/folder1/abc?cat1=PTO2Cat2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&TEXT1=Value
In this URL, TEXT1 at the end keeps changing for various pages. The Value will not change though. So it will be something like
For Page 1
http://subdomain.domain.com/folder1/abc?cat1=PTO2Cat2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&TEXT1=Value
For Page 2
http://subdomain.domain.com/folder1/abc?cat1=PTO2Cat2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&TEXT2=Value
For Page n
http://subdomain.domain.com/folder1/abc?cat1=PTO2Cat2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&TEXTn=Value
How can I parametrize it? I tried something like this
for ($i=1;$i<=n;$i++)
{
$url = sprintf('http://subdomain.domain.com/folder1/abc?cat1=PTO2Cat2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&TEXT%d=Value',$i)
echo $url;
}
but it failed saying Sprintf too few arguments. Any suggestion, please?