PHP hyperlinks generator


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?
No comments posted yet

Your Answer:

Login to answer
153 Like 51 Dislike
Previous forums Next forums
Other forums

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

Is this possible? If one file assigned to an ID...
I have a page that lists property listings assigned to a specific user (a manage page), with brief t

Why will this program not run if the variables are not global?
Hey guys I have a kind of perplexing situation that is probably simple, but I can't seem to understa

Pagination won't carry results past page 2.
Hi all,

I've worked out my pagination script and its paginating fine until I click next from

max() problem
I have a while loop to get image names.
Code: $imagequery = mysql_query("SELECT * FROM ad_i

Get value from Select menu
Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A descrip

Error in write byte array into document in SM58
Hi Gurus,

Getting the following error status in Transactional RFC (SM58) ..... *Error i

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

How to set pass login name from htaccess to php
When the user logs into my members page via htaccess, I'd like to retain the username so that I can

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