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

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

why isn't this PHP code working ???
it's suppose to find a name on the database.

<?php

$s = $_POST["lname&

Multi-user card game
I'm writing a batch of games and such. Lottery is finished, Poker,blackjack,etc are next. They will

Output Full URL of Current Page
Let's say I am currently viewing a dynamic page:

http://www.mydomain.com/directory/index.php

Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along

Displaying values from a SQL count...
Hi,
Easy enough question i just forget the exact method ..
I have ...

Code: //count win

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what c

Preg_match with an array
is there an away to use preg_match with an array?

i want to check a string with an array to s

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

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