Most interesting feature nowadays in all web apps is User Interface. Facebook has the simple and most powerful interface, the navigation like Home, Profile and other few links that stick to the top, whenever you scroll or navigate to the bottom of the page so that user may be able to navigate where ever he/she wants. In … Continue Reading
Monthly Archives
April 2012
How to reverse a number in php without built in functions
A Simple PHP Home work code that returns the reverse of a given number,
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?php $num = 1234; $rem =0; $rev =0; $originalnum = $num; while($num > 1) { $rem = $num %10; $rev = ($rev * 10)+ $rem; $num = $num /10; } echo "Original Number: ". $originalnum; echo " Reverse : ". $rev; ?> |
The Logic here is simple. First get the given number and extract the final digit. Initially the reverse of the number will be zero, on each iteration multiply the reverse with 10 and add the modulus result.

How to create template file from custom module in drupal
A Drupal theme is a set of files that defines the presentation layer. Drupal has its own way of styling data. After the data is fetched from database or other source, the data needs to be passed to several hook functions for adding additional data, markup and style. In this article we will see how … Continue Reading
What is the use of session_id() in PHP ?
Overview of session_id in PHP The session_id() is one of the in built functions in PHP. Almost in all Framework’s and CMS’s it has been utilized to find the current session. In this tutorial we will see how to utilize this session_id() in small applications apart from Framework and CMS. Generally the session_id() will be … Continue Reading
Using CURL Functions in magento way
PHP CURL library is used to fetch third party contents, transfer files and post data. Magento Wraps the CURL Functions in its library with its own wrapper functions. There is no Hard and Fast Rule that we need to only use this function, but the magento core code makes use of this library. Varien_Http_Adapter_Curl class … Continue Reading
How to Disable Caches programmatically in magento
Magento has an in built Caching System that improves the Performance of the website. But this feature should be turned off during Development and theme design to view our changes properly. Sometimes we may come across a situation like our admin panel cannot be accessed due to some unfinished code or error. Even though we … Continue Reading
How to toggle character case in PHP without strlower, strupper & ucfirst (inbuilt) and Array function
Toggling between upper and lower case letter is quite challenging. There is a PHP inbuilt function’s which can do this operation PHP: strtoupper – Manual , PHP strtolower() Function & PHP: ucfirst – Manual , the real challenge would be you have to toggle case of the given word without using PHP built in function … Continue Reading