Following is my folder structure
--project
|_____classes
|_____config.php
|_____classes.php
|_____project
|_____index.php
|_____dashboard.php
According to the folder structure, I have all the database configurations in config.php & I have it extended in classes.php and more classes in it.
Now when I use it in the file in dashboard.php in the project folder I have to do something like this includes("../classes/config.php");
I have read the namespace concept in PHP, I have viewed many videos but I am not able to understand the concept that how to use a namespace instead of the include('');
thing.
Can anyone provide me a demo code or source codes .zip file so that I can understand the concept to implement in the project?
Any helps appreciated. Thanks :)