Chikwado Posted August 30, 2015 Share Posted August 30, 2015 (edited) Can some one help explain this: I have my file header, nav, aside, section, article and footer. I want to wrrap them in array insted of using "include" and "require_once". I have read some example here But did not completely understood what was said Edited August 30, 2015 by Chikwado Link to comment Share on other sites More sharing options...
dsonesuk Posted August 30, 2015 Share Posted August 30, 2015 ??? What's the logic in doing that? Link to comment Share on other sites More sharing options...
Chikwado Posted August 30, 2015 Author Share Posted August 30, 2015 (edited) I have seen some people doing it, I am a learner, whenever I see something new I will try to understand what it means. My question is this: Is it meaningful to do it so? If it is, the I will try it. For example: $file = array([0] = file0.txt; [1] = file1.txt;[2] = file2.txt; ); I have seen these from a hosting company. Edited August 30, 2015 by Chikwado Link to comment Share on other sites More sharing options...
dsonesuk Posted August 30, 2015 Share Posted August 30, 2015 But why place in array instead of include or require_once, you still have to reference those files with index with include or require_once include "header.php"; with array $file = array('header.php', 'nav.php'); include $file[0]; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now