Clear the TINYMCE editor's content using jquery.

JQuery | TINYMCE | Clear TINYMCE editor  There is a method called setContent() in TINTMCE which you can use to reset/clear the TINTMCE editor. <script> // if one editor existing in your page. tinyMCE.activeEditor.setContent(''); </script>…
 Uncaught TypeError: e.indexOf is not a function in JQuery

Uncaught TypeError: e.indexOf is not a function in JQuery

JQuery | Uncaught TypeError: e.indexOf is not a function This error occur because you may try to load an event handler which is removed from latest version of jQuery. Event handler like .load(), .error(), .toggle()…

CodeIgniter where_in condition

Codeigniter | where_in  The where_in() allows you to pass an array in where clause. It generates a WHERE field IN ('item', 'item') SQL query. Syntax: $this->db->where('condition'); <?php $ids = array('1', '2', '3'); $this->db->from('users'); $this->db->where_in('id', $ids);…
A non-numeric value encountered in PHP

A non-numeric value encountered in PHP

PHP | Warning: A non-numeric value encountered This error occur when you are trying to do a mathematical operation on an integer with a nun-numeric value or a string.  Info: New E_WARNING and E_NOTICE errors…

Comments in PHP

PHP | Comments A comment in PHP code is a line that is not executed as a part of the program. It's only read by someone who is looking at the code. By reading the comments…

Is PHP a case sensitive language?

PHP | Case Sensitive In PHP, keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are not case sensitive but all variable names are case-sensitive.   If you defined function name in…

PHP Syntax and Tags

PHP | Syntax and Tags PHP introduce list of Tags to code php. PHP tags allow PHP parsing engine to get in and get out from the php block. A php script can be placed…

What will be the value of $x when given statement execute?

PHP | Statement $x = 3 + "15%" + "$25"? The correct answer is 18. Here’s why: PHP is a  losely typeed language, therefor it do automatic type conversion based on the context in which…

What are the errors in below code? What will be output and how can you fix it?

PHP | Array error fix | array_merge() The output will be as follows: array(2) { [0]=> int(1) [1]=> int(2) } NULL NULL It will also generate two warning messages as follows: Warning: array_merge(): Argument #2…

What will be the output of the following statements and why?

PHP | Output of the following statements var_dump(0123 == 123); var_dump('0123' == 123); var_dump('0123' === 123   var_dump(0123 == 123) This will output bool(false) because the leading 0 in 0123 tells PHP interpreter to treat the value…

What will be the output of $a and $b once code bellow is executed?

PHP | output of $a and $b once this code $a = '1'; $b = &$a; $b = "2$b" executed; Both $a and $b will output a string "21".   Because the statement $b = &$a; sets…

List Databases supported By Codeigniter Frameworks

Codeigniter | List Databases supported By Codeigniter Following Databases are supported by Codeigniter Frameworks: Database Name Drivers to support Codeigniter MySQL MySQL (deprecated), MYSQLI and PDO drivers Oracle oci8 and PDO drivers PostgreSQL Postgre and…

In which files routes are defined in Codeigniter?

Codeigniter | routes  Routing rules are defined in your application/config/routes.php file.    In it you'll see an array called $route that permits you to specify your own routing criteria. Routes can either be specified using…

What is helpers in CodeIgniter and how to load helper file?

CodeIgniter | What is helpers | Load helper file Helper is simply a collection of function in a particular category which help you with tasks. The helper file can be loaded in controller constructor, some…

How to set timezone in codeigniter?

Codeigniter | Set timezone To set default timezone in Codeigniter, you can add the date_default_timezone_set() function in your application/config.php or index.php file. date_default_timezone_set('your timezone');   <?php // India timezone date_default_timezone_set('Asia/Kolkata'); ?>  

How to set or get config variables in Codeigniter?

Codeigniter | SET or GET config variables The config set_item() & item() functions are work for SET and GET a config variable in codeigniter   In Codeigniter by default all config variables are located at “application/config/config.php” file.…

What is the default URL pattern used in Codeigniter framework?

Codeigniter | The default URL pattern In CodeIgniter, URLs are designed to be search-engine and user-friendly. CodeIgniter uses a segment-based approach rather than using "query string" based approach. http://www.example.com/user/edit/rakesh The default URL pattern in CodeIgniter…

How many types of messages can you log in Codeigniter?

Codeigniter | Types of error logging There are three message types in Codeigniter: Error Messages These are actual errors, such as PHP errors or user errors. Debug Messages These are messages that assist in debugging.…

What is HTML?

HTML | What is HTML HTML is a web language stands for Hyper Text Markup Language. It was created by Berners-Lee in late 1991. HTML is the standard markup language for creating a web pages…