Hi,
I have practically no idea how to get the following done.
I have a .txt file with data in the format below:
demagogue : a leader who makes use of popular prejudices and false claims and promises in order to gain power |
bucket shop : a dishonest brokerage firm |
collywobbles : pain in the abdomen and especially in the stomach |
And this my php :
<?php $file = fopen("interesting_words.txt","r"); $raw_string = fread($file,filesize("interesting_words.txt")); fclose($file); $words_array = explode("|",$raw_string); echo $words_array[array_rand($words_array)]; srand(date("ymd")); $wordIndex = rand(0, $wordCount); ?>I would like this to appear as follows when rendered in a box:
BUCKET SHOP
a dishonest brokerage firm
This is for a WORD OF THE DAY page for my language students.
Any help will be much appreciated.