0

This is my explaination about this problems.

My structure

config.php
modules
--module1
----menu.php
--module2
----menu.php

So, each module contains a menu.php file that just returns an array.

Now from config.php, I want to get that array. How can I do that ?

Thank you very much!

1
  • Your question is unclear. Please post the relevant code in that config.php file and also say how those other files are used. Commented Mar 6, 2016 at 12:10

1 Answer 1

2
$menu1 = include_once 'modules/module1/menu.php';
$menu2 = include_once 'modules/module2/menu.php';
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you, It's answer, I do not know the include function will return value. I'll accept your answer in minutes
in your menu.php just make it like return array(......); It will include the content from menu.php to the variables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.