How to use remap method in CodeIgniter

How to use remap method in CodeIgniter

In this tutorial I will explain how to use remap method in CodeIgniter with simple example. CodeIgniter permits you to override which method in the controller gets called through the use of the _remap() method and allow you to define your own method routing rules. Note : If your controller contains a method named _remap(), it will always get called regardless of what your URI contains. For Example: If you …

Continue reading

How to catch events on future elements in jQuery

In this tutorial I will show you how to catch events on future elements in jQuery. For example if we need to add click event on ajax calls loaded elements we need to use on() method of jQuery. Syntax for on() method: $(document).on(event, selector, handler) Example: Also we can replace $(document) with a selector for a static parent of the element. For example, if we have a static div element …

Continue reading

How to check a HTML element exists and empty in jQuery

In this tutorial I will show you how to check a HTML element exists and empty using jQuery. Some times we need to check if the DIV is exists or not to add some conditional content. This tutorial will be helpful. For example we have following DIV: If you want to check HTML element is exists or not, you can use the length property of the jQuery object. Now if …

Continue reading

How to remove index.php from URL in CodeIgniter

How to remove index.php from URL in CodeIgniter

If we need a clean URL in CodeIgniter. We need to remove index.php from url in CodeIgniter. So in this tutorial I will show you, how to remove index.php from URL in CodeIgniter. In default you will get index.php in url in CodeIgniter. like :- Codeigniter provide easy way for url rewrite functionality to get clean url or remove index.php from url in codeigniter. So we will follow some steps …

Continue reading

Get current Indian time in PHP

In this tutorial I will show you to get current indian time in PHP using DateTimeZone and DateTime function. First get the DateTime object and set indian timezone to this DateTime object. Now format the output as in the following example.

Convert Uppercase to Lowercase without using PHP string functions

In this tutorial I will show you, how to Convert Uppercase to Lowercase, Lowercase to Uppercase without using PHP string functions. Let’s take a simple example of convert uppercase to lowercase and lowercase to uppercase. Explanation: ASCII values of lowercase characters(a-z) are from 97-122 and ASCII values of uppercase characters(A-Z) are from 65-90. ORD() function returns ASCII value of character. Difference between ASCII values of lowercase characters to uppercase character …

Continue reading

Send multiple emails at once using PHPMailer

Send multiple emails at once using PHPMailer

In this tutorial I will show you how to send multiple emails at once using PHPMailer. Example Code: In following example we have an array of email and content to be sent. So we have created an object on PHPMailer and sending email in for loop. Now most important part of this example is at the end. If you not mention “$mail->ClearAddresses();” , Then all email id except the last …

Continue reading