Category : PHP


How to remove null values from array in PHP?

you have array with null value and you want to remove all null value from that array without loop. you can remove your all null value from array without loop. PHP array_filter function through you can remove all null value, you see following example how to remove null value : <strong>Example:</strong> <pre class="language-php"> $example = array(100, "hardik", null, "hey", NULL, "", 77); $result = array_filter($example, function($value) { return !is_null($value); }); print_r($result); </pre> <strong>Output:</strong> <pre>Array ( [0] => 100 [1] => hardik [3] => hey [5.....

By Hardik Savani | January 28, 2016 | | 2192 Viewer | Category : PHP
READ MORE

How to Solve overwrite index.php in windows wampserver ?

Many time you have face a problem in windows wampserver or virtualhost of index.php file overwrite. i also fetch that problem like: http://localhost/test/index.php/admin In this url you can see index.php wtite in url, but URL must be without index.php. so if you are using windows wampserver then you can easily solve out this problem by folowing step: <strong>1. Open File : </strong>C:\wamp\bin\apache\Apache2.4.4\conf\httpd.conf <strong>2. Find : </strong> #LoadModule rewrite_module modules/mod_rewrite.so and Then, Just Change, Only remove ‘#’ sign. <pre> #LoadModule rewrite_module mo.....

By Hardik Savani | January 23, 2016 | | 1312 Viewer | Category : PHP
READ MORE

How can make an array from the values of another array's key?

If you are working on PHP or other PHP framework and you want to create array of another array value. now you can see on following example how can you make array form another multidimensional array key's. For example you have array like: <pre class="language-php"> $multi = array( ['1'] => array('id'=>1,'name'=>'hardik'), ['2'] => array('id'=>1,'name'=>'vimal'), ['3'] => array('id'=>1,'name'=>'harshad'), ) </pre> but if you want to this multi-dimensional array just like this way: <pre class="language-php"> $test = array('hardik','vimal','harshad'); </pre> so, we can make t.....

By Hardik Savani | January 21, 2016 | | 615 Viewer | Category : PHP
READ MORE

How to merge two array with same keys without loop in PHP ?

you want to merge two array but without overwrite value then you can see how to merge two array in following example.you have two array and you want to merge with overwrite with key then you fetch many problem. like this two array : <strong>My Array:</strong> <pre class="language-php"> $array1 = [ '0'=> ['name'=>'Hardik','Surname'=>'Savani'], '1'=> ['name'=>'Harsukh','Surname'=>'Makawana'], ]; $array2 = [ '0'=> ['name1'=>'Harshad','Surname1'=>'Pathak'], '1'=> ['name1'=>'Vimal','Surname1'=>'Kashiyani'], ]; </pre> AND You want.....

By Hardik Savani | January 21, 2016 | | 1204 Viewer | Category : PHP
READ MORE

How to count unique domains from email address field in MySQL ?

you want to count domain from your email address field in mysql. if you are working on PHP then you could do easily by using explode function and counting domains, but that way is a very bad logic and it take max time on execution when you have lot of data. But we can do easily in MySQL by using SUBSTRING_INDEX(). SUBSTRING_INDEX() take a three arguments string, delimeter and number.string is a source of string, the delimeter to search for in the string and the number parameter will search for delimeter.If pass negative in third argument then it will everything from the left of the targeted .....

By Hardik Savani | January 14, 2016 | | 841 Viewer | Category : PHP
READ MORE

How to create responsive menu in html/PHP ?

Now i am going to show how to create responsive menu in your html website. i will show you how to create responsive menu using css, html and jquery. we have to also use media query. it is a pretty simple to create responsive menu. now i listed two file one is html and second is css file this two file make a simple responsive menu and you can easy to change and modification in in this file. it will easy to integrate with php, .net or any php framework. how to create a responsive menu bar in html, responsive menu bar jquery example, responsive menu using css and jquery, responsive menu with css.....

By Hardik Savani | January 9, 2016 | | 993 Viewer | Category : PHP
READ MORE

How to add ckeditor with image upload in Laravel ?

if you want to use ckeditor in laravel and you also want to add file uploading as well. if you are use simply in php then it is very simple. but if you are set laravel then you fetch many problem like i also fetch lots of problem. Now, i will give you few step to set ckeditor with file uploading and you will easily apply this. this is a very simple to browse your image, file etc upload. use ckeditor in php, use ckeditor in laravel 4, use ckeditor in laravel 5, how to add ckeditor in laravel, laravel ckeditor image upload, laravel ckeditor example, laravel ckeditor sample, ckeditor laravel 4,.....

By Hardik Savani | January 8, 2016 | | 11318 Viewer | Category : PHP
READ MORE

How to check Object is empty or not in Jquery/JavaScript ?

you can check your JavaScript OR jQuery object is empty or not, because we need to check many place our jQuery object is empty, null or undefined etc., So usually, we can check using $.isEmptyObject() as i explained as under. how to check empty object in javascript, how to check empty object in jquery, jQuery.isEmptyObject() example, jquery check object is null, jquery check object is empty, jquery check object is empty or not, how to check json object is empty or not in jquery, check if json object is empty jquery <pre class="language-javascript"> if($.isEmptyObject(your_object)){ alert(.....

By Hardik Savani | January 8, 2016 | | 14302 Viewer | Category : PHP
READ MORE

How to set Datepicker in bootstrap?

You are working on bootstrap and you want to add datepicker, then you have to use bootstrap-datepicker library. but if you are new and how to add datepicker in bootstrap then i provide you example of bootstrap datepicker. How to set Datepicker in bootstrap datepicker, how to use datepicker in bootstrap, implement bootstrap datepicker, use bootstrap datepicker in php, how to use bootstrap datepicker in html, bootstrap datepicker example demo. <pre class="code language-html"> <title>How To Use Datepiker</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6.....

By Hardik Savani | January 8, 2016 | | 11320 Viewer | Category : PHP
READ MORE

Autocomplete with images and custom html code in Jquery UI?

In your website you require to set auto-complete user full-name with image. generally you use auto-complete with name, email, message etc text but if you want to add image or your own html code like user html tag in autocomplete then you have to use "_renderItem" in jquery ui. how you will create i give you example of html file : <strong>Index.html</strong> <pre class="code language-html language-javascript"> <title>How To Use Autocomplete</title> <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="https.....

By Hardik Savani | January 7, 2016 | | 10448 Viewer | Category : PHP
READ MORE

    How to connect mysql database in node js with example?

    How to connect mysql database in node js with example?

    Open Post

    PHP - File upload progress bar with percentage using form jquery example

    PHP - File upload progress bar with percentage using form jquery example

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    Laravel 5 - Image Upload and Resize Example using Intervention Image Package

    Laravel 5 - Image Upload and Resize Example using Intervention Image Package

    Open Post

    Magento 2 - How to solve one or more indexers are invalid by command line?

    Magento 2 - How to solve one or more indexers are invalid by command line?

    Open Post

    Laravel 5 - Multiple markers in google map using gmaps.js

    Laravel 5 - Multiple markers in google map using gmaps.js

    Open Post