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?

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.