Can someone help me get a page that will collect 2 words from a .txt file and then print the two words on the php page?
The words are all on a separate link in the .txt file
Can someone help me get a page that will collect 2 words from a .txt file and then print the two words on the php page?
The words are all on a separate link in the .txt file
Or, if you wanted to have some info in between them...PHP Code:<?php
echo file_get_contents("file.txt");
?>
That would givePHP Code:<?php
$stuff = file_get_contents("file.txt");
$array = explode(" ",$stuff);
echo "You are ". $array[0] .", correct?";
echo "My name is ". $array[1] .".";
?>
You are Brian, correct?
My name is Jacob.
with:
Brian Jacob
in the text file
Bookmarks