/    Sign up×
Community /Pin to ProfileBookmark

Echoing text from another file

Hi folks…
How would i go about using the echo function, but getting the data that is to be echoed from another file?

Fet

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogFeb 21.2006 — [url=http://www.php.net/include]include[/url], [url=http://www.php.net/require]require[/url], or [url=http://www.php.net/readfile]readfile()[/url] would probably be your best options. (You don't even use echo with them.)
Copy linkTweet thisAlerts:
@scottyrobauthorFeb 21.2006 — the thing is i want to have a few titles paragraphs of text in a .txt file but if i used something like Include then they will be like the .txt file one after another.. i was thinking of using echo because i could then chose, where abouts on the page i wanted each paragraph to be placed... i want it in a text file so that it can be easily edited by someone who has NO programming language!

Cheers, Fet
Copy linkTweet thisAlerts:
@mobtexFeb 21.2006 — file_get_contents is also an option.
×

Success!

Help @scottyrob spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...