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…

What is the difference between primary key and unique constraints?

SQL | Difference between primary key and unique constraints There is only one primary key in a table. It creates the cluster index automatically and it cannot have NULL value where as there can be…

Write an SQL query to find names of employee start with 'A'?

SQL | LIKE operator The LIKE operator of SQL is used for such kind of operations. It is used to fetch filtered data by searching for a particular pattern in where clause.   The Syntax for…

What is the difference between BETWEEN and IN operator in SQL?

SQL | difference between BETWEEN and IN operator The BETWEEN operator select all records between the given range whereas IN operator select all matching records  given with WHERE clause.   BETWEEN operator The Between operator in sql…

How will you check if a file exists or not using PHP?

PHP | file_exists( ) Function File's existence can be confirmed using file_exist() function which takes file name as an argument. file_exist("abc.jpg")   The file_exists() function is an inbuilt function in PHP which is used to…

How can you tell if a number is even or odd without using any condition or loop?

A trick to check whether a number is even or odd without using any condition or loop. <?php $arr=array("0"=>"Even","1"=>"Odd"); $check=13; echo "Your number is: ".$arr[$check%2]; ?>  

What is the difference between a session and cookies in PHP?

Session V/S Cookies Cookie is an array of data stored by the browser on client location and sent to the server with every request. It store limited amount of data about 4kb(i.e.: 4096 bytes). It is…

Write a example code showing the nested ternary conditional operator in PHP?

A example code showing the nested ternary conditional operator in PHP. <?php $background_color = ($num == 0 ? 'blue' : ($num > 0 ? 'green' : 'red')); ?> Here we are assigning different strings to…

Convert Object To Array in PHP

For converting an object to an array is a small thing which can be achieved by  a single line of code. For this purpose we need to use typecasting. Typecasting is a way to use/convert…

Converting array of objects to array in php

Array of objects look like this: Array ( [0] => stdClass Object ( [id] => 1 [name] => Ram [roll] => 12 ) [1] => stdClass Object ( [id] => 2 [name] => Shyam [roll]…

Sort an array of array by date in PHP

Here a situation in which we have to sort an array of array by date. Array of array is a multi dimensional array in which an array holding multiple array as data. the array is…

Today spacial posts