Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
I had a question about a dictionary
Old 06-19-2009, 12:42 AM I had a question about a dictionary
Junior Talker

Posts: 3
Name: E
Trades: 0
How can I make something like this

http://www.investopedia.com/categories/acronyms.asp

Is there anyway I can bypass making each word (definition) a link?

Or do I have to make EACH one?


Thanks.
financialpig is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-19-2009, 02:47 AM Re: I had a question about a dictionary
jason_alan's Avatar
Super Talker

Posts: 100
Name: Jason
Location: Seattle, WA
Trades: 0
You need a database of words and acronyms, and yes, you can display it anyway you need to in php. Like for example, you have a database of words with the columns: word, acronym, link. For example:

PHP Code:
$output = array();
while (
$row mysql_fetch_array($res)) {
  
$html $row['word'] . ' - ' $row['acronym'];
  if (!empty(
$row['link']) {
    
$html '<a href="' $row['link'] . '">' $html '</a>';
  }
  
$html '<p>' $html '</p>';
  
$output[] = $html;
}
// Print all records
echo implode("\n"$output); 
jason_alan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to I had a question about a dictionary
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.79874 seconds with 12 queries