Posts

How to reverse a string without using php function in php?

How to reverse a string without using function in php <?php error_reporting(NULL); $string = 'This is a reversed string'; $len = 0; do{ $len++; } //$len is the length of string while($string[$len]!=''); for($i=$len-1;$i>=0;$i--){ echo $string[$i]; } ?> gnirts desrever a si sihT

Mysql interview question and answer?

1. Define SQL? Answer : SQL stands for Structured Query Language. SQL is a programming Language designed specially for managing data in Relational Database Management System (RDBMS). 2. What is RDBMS? Explain its features? Answer : A Relational Database Management System (RDBMS) is the most widely used database Management System based on the Relational Database model. Features of RDBMS Stores data in tables. Tables have rows and column. Creation and Retrieval of Table is allowed through SQL. 3. What is Data Mining? Answer : Data Mining is a subcategory of Computer Science which aims at extraction of information from set of data and transform it into Human Readable structure, to be used later. 4. What is an ERD? Answer : ERD stands for Entity Relationship Diagram. Entity Relationship Diagram is the graphical representation of tables, with the relationship between them. 5. What is the difference between Primary Key and Unique Key? Answer : Both

What is difference between Array combine() and Array merge()?

Array_combine(): To Combines the elements of two arrays and Returns the New Array.The new Array keys are the values of First Array values and the new array values are Second array values. Array_combine()Example: <?php $arr=array(1,2,50); $arr1=array(452,672,542); print_r(array_combine($arr,$arr1)); ?> Output: Array ( [1] => 452 [2] => 672 [50] => 542 ) Array_merge(): merges two or more Arrays as New Array. Array_merge() Example: <?php $arr=array(101,301,501); $arr1=array(451,671,541); print_r(array_merge($arr,$arr1)); ?> output: Array ( [0] => 101 [1] => 301 [2] => 501 [3] => 451 [4] => 671 [5] => 541 )

How to make index.html default instead of index.php?

How to make index.html default instead of index.php?   Put a .htaccess file in your web root directory, if there isn't one yet. Then add the line: DirectoryIndex index.html index.htm index.php or change it accordingly. That line tells apache what file to look at first when it is not specified in the URL, in the same order that you put it after DirectoryIndex. In this example it would first look for index.html, load it if found, if not look for index.htm, load it if found, and if not load index.php. 

How to call a function on mouse scroll wheel via jquery?

How to call a function on mouse scroll wheel via jquery? Simple copy and paste this code and follow the steps. <script> function handle(delta) {         if (delta < 0)         {         functionscrolldown(); // You can change here the function event according to your need on mouse wheel down         }         else         {         functionscrollup(); // You can change here the function event according to your need on mouse wheel up         } }  /** Event handler for mouse wheel event.  */  /* here mouse wheel event stop from the browser */ $(document).on("click", '.fancybox-close', function(e) { // you also need to stop the Mouse wheel function event on a certain evernt of mouse click so you need to change the ".fancybox-close" class accoding to your click button window.removeEventListener('DOMMouseScroll', wheel, false); window.removeEventListener('mousewheel', wheel, false); });  /* here mouse wheel event will start for the

How to Install Cakephp?

Image
On Cakephp Welcome Screen, you will fine two error. To remove this error, you must be change 01. Security . salt value. 02. Security . cipherSeed value.     Please Change Security.salt value: 1. Open this project in php text editor. 2. Go to app/config/core.php file 3. In line no 204 change Security . salt value. // you can change this value whatever you want 4. Then refresh the startup screen. Our 1 st error has been removed. »Change Security.cipherSeed value: 1. Open this project in php text editor 2. Go to app/config/core.php file 3. In line no 208 change Security . cipherSeed value. // you can change this value whatever you want but only in digits Then at the end of page you will find database error so for remove this error you need to edit the page 1. Open this project in php text editor 2. Go to app/config/database.php.default file and rename (remove .default ) this file. 3. Rename file will be like this database.php 4. Then refresh the startup screen.

is_home() and is_front_page() not working in wordpress?

I want to same content on home page but is_home() and is_front_page() not working in wordpress. Why? Then i search some sites and find a solution. Here is the solution:- Just add this like right before of your condition <?php wp_reset_query(); ?> <?php if(!is_home()){         echo "home page"; <?php } else { echo "Not home page"; } Thanks