first time here.
I am trying to migrate this code from Magento 1.6 to M 2.0. I have to note that I just have basic knowledge with programming so this is very hard for me. I have done some research where I found Mage change to Bootstrap in M 2.0. and getModel have changed also. I am not asking for the complete solution as I want to practice. Can you tell me what things are wrong or guide me a little so I can find it by myself?
$mageFilename = '../app/Mage.php';
require_once $mageFilename;
umask(0);
Mage::app('default');
$intRootCategoryId = Mage::app()->getStore()->getRootCategoryId();
$objCategories = Mage::getModel('catalog/category')->getCollection();
$arrCategories = array();