Jump to content

syed544

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

syed544's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. bravo ! yes, it works gr8. Thanks a lot xyph.
  2. Hi mjahkoh, Thanks for replying. but unfortunately I dont need this solution which u have suggested. I think there's some misinterpretation. I request you to please read again my query. I want to use a text file "random.txt" for providing article title names (not website names) with their respective links. and instead of providing title+link in this format: I want to add the content of random.txt file as like below: then, what will be the php code to display two random texts (article title with its link) in the body of the html file?
  3. I have a text file, named as "random.txt" with the content as like this: Now in my php file, I want to randomly select & display two titles (with respective link) as like this: <? $textfile ="random.txt"; $items = file("$textfile"); shuffle ($items); echo "RandLink1 : " . $items[0]; echo "<br>RandLink2 : " . $items[1]; ?> *** The result is showing as required by me. But I want to load the text file (random.txt) as like this only : If I load this text file as like above (writing only the link and title names in the file), then what will be the php code to display two random titles on the result page? Thanks for your kind help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.