Php
addcslashes — Quote string with slashes in a C style addslashes — Quote string with slashes bin2hex — Convert binary data into hexadecimal representation chop — Alias of rtrim c [...]
Let say an array is $myArray=array(10,20,50,27,18,32,133); Sort this array to descending to ascending order. To achieve this, we have to use the php predefined function "sort". Example: < [...]
A palindrome is a word or sentence that reads the same forward as it does backward. The words a and I are perhaps the simplest and least interesting palindromes; the word racecar and the na [...]
Let say a string is " MyNameIsJanaki". We have to reverse it which will display as "ikanaJsIemaNyM" Step1. Declare a variable in php as $mystring="MyNameIsJanaki"; Step2. Now what we will do is, [...]
Get host name: <?php echo Mage::app()->getFrontController()->getRequest()->getHttpHost();?> Get base direcrory: <?php echo Mage::getBaseDir();?> Get base URL: <?php [...]
Step1. PHP Code to retrieve top level categories for navigation and save it at the following location. in short this file contain code related to catalog Navigation Model which retrieves top level ca [...]
To set a Magento session variable: $myValue = 'Hello World'; Mage::getSingleton('core/session')->setMyValue($myValue); To Retrieve: $myValue = ''; $myValue=Mage::getSin [...]
Folder Structure for a new module in Magento. Step1: Create a new namespace inside app/code/community folder. namespace is nothing but a folder or directory name which can be easily ident [...]
Problem: The installation of Magento gives with the connection to the database following report: “innoDB storage engine is not supported”. This is common problem in Magento ver. 1.6.2.0 [...]