GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Oct-2007, 12:11
lantana727 lantana727 is offline
New Member
 
Join Date: Oct 2007
Posts: 3
lantana727 is on a distinguished road

Is there any php code


that can turn certain words into hyperlinks.
For example I have context page, but I want to insert some affiliate links.
Or links to other sites where there is more info. How can I do this?
Are they all database programs what can do this. Or is there simple code I can copy paste to every single page. I don't have a huge site.
So I would do this on every page separately.
Thanks Guys
  #2  
Old 10-Nov-2007, 19:54
MonkOfox MonkOfox is offline
New Member
 
Join Date: Nov 2007
Posts: 21
MonkOfox is on a distinguished road

Re: Is there any php code


i guess you could echo a <a href></a> to the page?

is this what you are talking about?
  #3  
Old 11-Nov-2007, 05:16
filth filth is offline
New Member
 
Join Date: Oct 2007
Posts: 5
filth is on a distinguished road

Re: Is there any php code


you could do something like this:-

PHP Code:

$word_array = array('/Server/i', '/hosting/i');$link_array = array('<a href="http://www.serverurl.com">server</a>', '<a href="http://hostingurl.com">hosting</a>');$string = 'If you would like to be hosted on a reliable server then the only hosting company you should trust is ...';$output = preg_replace($word_array, $link_array, $string);echo $output; 



Alternatively you could use javascript to do it client side.
 
 

Recent GIDBlogA Week in Kuwait by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sort random access file? wmmccoy0910 C Programming Language 12 04-Sep-2006 03:40
Here it is again! 35% - 40% off For Life! my-e-space Web Hosting Advertisements & Offers 0 20-Apr-2006 14:48
Re: Porting code from C++ to PHP cable_guy_67 MySQL / PHP Forum 2 03-Aug-2005 17:19
Problem with int mixed with char,... leitz C++ Forum 17 07-Dec-2004 20:56
Parsing PHP code that's stored in a database. JdS MySQL / PHP Forum 3 13-May-2004 09:15

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:11.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.