0

Hi! I'm a newbie and have some silly questions.

PHP:
1. I want to inlude a txt file in array. I have an associative array.
What format does the data in txt file must be?
e.g. array I want to have:

$m["foo"] = "text 1";
$m["foo foo"] = "text 2";
$m["abc"] = "text 3";

I put it into a page, but how to make it work with the external file?

2. How can I unit two web-pages (e.g. template and some data page) in one without include or a readFile functions?

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by hradek
0

Hi! I'm a newbie and have some silly questions.

PHP:
1. I want to inlude a txt file in array. I have an associative array.
What format does the data in txt file must be?
e.g. array I want to have:

$m["foo"] = "text 1";
$m["foo foo"] = "text 2";
$m["abc"] = "text 3";

I put it into a page, but how to make it work with the external file?

2. How can I unit two web-pages (e.g. template and some data page) in one without include or a readFile functions?

Try:

$arrayVar = array('foo' => 'text 1', 'foo foo' => 'text 2', 'abc' => 'text 3');

Why are you trying to unit two web-pages and why do you not want to use include? You trying to do some old school frames or even iframes?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.