Well i was wordering how can i do one file for whole site or with includes.
Example i see some sites have index.php?page=register etc or index.php?page=portofolio
How can i do that without if else because i have problems with it.

Most likely the contents come from a database table. It searches for "register" and returns the contents associated with it.

the ? passes parameters
and the PHP code reads those parameters.

for example I can point a link to index.php?site=privacypolicy

and on my index page include a PHP code that acts depending on those paraemeters

if (isset($_GET['site'])) {
$page = $_GET['site'];

case "articles": include("inc/articles.php");
case "home": include("inc/home.php");
case "privacypolicy": include("inc/privacypolicy.php");

and the content changes depending on the parameter passed

Thanks Terabyte. That's helped me alot.