Count matching values of a array in PHP

Very simple function to count matching values of a array. Output: Array ( [1] => uk [2] => usa [5] => roi [7] => uae [8] => bd ) Array ( [uk] => 3 [usa] => 1 [roi] => 2 [uae] => 1 [bd] => 4 )

Magento CMS Page menu

We can put this function in helper of any extension and call from theme. or you we can put this directly from theme. or create a file template/page/html/leftmeu.phtml and add block in page.xml (above or below breadcrumbs) then you can call from theme

Product level shipping in Magento

By default Magento don’t let you set shipping cost per product level. You can do it by using some technique with flatrate shipping method. Step 1: Create attribute. Create a attribute from admin panel catalog->attributes, lets give it a name shipping_world and add this attribute to your default “attribute set” to do that go to […]