PHP hyperlinks generator - HELP plz


Posted on 16th Feb 2014 07:03 pm by admin

Hi

I need some help to get this done using php:

Did you know?Explore Trending and Topic pages for more stories like this.

1 - I have few hyperlinks say 500 in format like:

<a href="http://domaina.com/1.html" target="_blank">http://domaina.com/1.html</a>
<a href="http://domainb.com/1.html" target="_blank">http://domainb.com/1.html</a>
<a href="http://domainc.com/21.html" target="_blank">http://domainc.com/21.html</a>
<a href="http://domaind.com/new.php" target="_blank">http://domaind.com/new.php</a>

etc etc

Now I want to convert them into format like:

<a href="http://domaina.com/1.html" target="_blank">keyword 1</a>
<a href="http://domainb.com/1.html" target="_blank">keyword 2</a>
<a href="http://domainc.com/21.html" target="_blank">keyword 3</a>
<a href="http://domaind.com/new.php" target="_blank">keyword 4</a>


Here keyword 1,2,3,4 can be taken randomly from a file which has huge list of keywords or may be we can paste the hyperlinks and keywords in php form itself and then it just links into the manner as given above.

Can anyone provide the code for doing this?

Thanks
No comments posted yet

Your Answer:

Login to answer
91 Like 38 Dislike
Previous forums Next forums
Other forums

Strange PHP/mySQL error ... am I just tired?
Code: <?

## CONNECT TO DB FUNCTION!
function ConnectTo($db2con)
{
$hostNam

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

PHP friend keyword equivalent
is there a PHP equivalent for the C++ friend keyword?

session_destroy();
new to php
I have a simple login and am trying to write a logout.
I set a $_SESSION var to 1 i

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

System copy error in RUN ABAP REPORT PHASE
Hi,
I am performing system copy on my test server. I have previously taken export of JAVA + A

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

with clause
hi all, i have a big query that usually access the same table more than once. for example, i have s

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash