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…

How to include image, css and js file in codeigniter?

Codeigniter | Include image, css and js file In codeigniter, we need to load URL helper in controller and then use base_url() function to load the resources. // loading script <script type='text/javascript' src="<?php echo base_url('js/jquery.min.js');…

How to select dropdown item based on value

JQuery | Select dropdown item based on value Change selected option by value on select box with jQuery is common now a days. So let's we have a select element with fruits list, and we…

Get full url in php

PHP | Get URL with Parameter To get full url of a current page with get parameters, we use $_SERVER global variable. We need current url to perform different type of works. For complete URL…

Automatically change the html element size using css.

CSS | Fluid typography Changing size of text, image, div or any html element automatically without using any jquery or media queries. It is a fluid type technique that doesn't require any JavaScript. Using viewport…

How to use php array with sql IN operator?

SQL | IN operator with PHP Array In this article we will use PHP Array with SQL IN operator. SQL IN operator allows us to specify multiple values in where clause. So in this article…

Shutdown a window system through RUN or Command Prompt

SHUTDOWN | A CLI command for Windows It's really cool to shutdown your computer through Run command or command prompt. Actually shutdown is a CLI (command line interface) command or function which is use to…

What do you mean by foreign key?

SQL | Foreign Key A foreign key is a key used to link two tables.  A Primary key of a table is used as a foreign key for the other table. Primary key is a…

What is a view in SQL?

SQL | View View in SQL is a kind of virtual table. It does not physical exists in our database but have rows and column as there we have in real database table. we can…