Website showin 'index' instead of the page title on google

My uploaded php website shows ‘index’ instead of actual website title. Every webpage on my site has variable $title where I put page titles but for some reason on Google it says

INDEX.

Have you “viewed source” to confirm what is on your webpage page for the title?

If by that you mean have I gave the value to the $title variable then yes.

Part of the template.php :

 <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><?php echo $title;?></title>
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="mycode.js"></script>
    </head>

Part of the index.php page

$title="Permakultura";

By “view source” I mean in the browser to make sure that $titile is being loaded with the correct value.

Yes I did and the title stands there like it should but it sill says Index on Google.

Right Click > View Page Source.
Look for your title and see what it displays. If you can’t find your title.
CTRL+F and type in <title>

I did all that before and title is there.

i think its a case of google indexing your website before there was content so the ggole engine has not updated your new site info
submit your site using google webmaster tools
put a sitemap and then share your link on social media, wait for the facebook to show the website excerpt with your full title and then check after a few days if google index has updated

I’ve checked the website and it looks like everything is fine now. It must have been some error from host. Thanks guy for taking your time to respond me. Thank you all.