Latest Post

How to generate random alphanumeric string in PHP?

In this example i am going to show you how to generate randomly alphanumeric string OR number in PHP. when you need you generate random alphanumeric string for your unique field then you can easily create using substr(), md5(), rand(), uniqid(), mt_rand(), time() and str_shuffle() php function you can create several way unique code using following example: <strong>Example</strong> <pre class="language-php"> Example 1 $generated = substr(md5(rand()),0,5); print_r($generated);<br/> Example 2 $generated = rand(10000,99999); print_r($generated);<br/> Example 3 $generated = substr(md5(uniqid(rand(.....

By Hardik Savani | March 4, 2016 | | 2722 Viewer | Category : PHP

How to use each loop with class element of html in Jquery?

Whenever you need to use each loop in jquery then you can follow this example code. each with html class you can get whole object of that class using $(this) jquery function. In following example you can see i get attribute data-id using $(this).data('id'), that means you can take current class data attribute value. <strong>Example:</strong> <pre class="code language-html"> <html lang="en"> <head> <title>Each Loop with Class Jquery</title> <script src=""></script> </head> <body> .....

By Hardik Savani | March 4, 2016 | | 1220 Viewer | Category : Javascript HTML jQuery

How to import CSV file using mysql

In this post we have learn how to import CSV file using LOAD DATA INFILE statement. this is a very simple example for a import file to the database. Here we have provide a full sysntax for LOAD DATA INFILE statement. <strong>Sysntax</strong> <pre class="language-mysql"> LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name' [REPLACE | IGNORE] INTO TABLE tbl_name [CHARACTER SET charset_name] [{FIELDS | COLUMNS} [TERMINATED BY 'string'] [[OPTIONALLY] ENCLOSED BY 'char'] [ESCAPED BY 'char'] ] [LINES [STARTING BY 'string'] .....

By Hardik Savani | March 3, 2016 | | 3208 Viewer | Category : MySql

Laravel 5 create Custom Validation Rule example.

Custom Validation Rule is very usefull and interesting concept of laravel 5 because custom validation throught we can re-use validation and use it easily by just name as like laravel core validation(required,same,in etc.). So, In this post i am going to show you how to create custom validation rules in laravel 5.2. you can create very simple way and use too. you can create custom validation rules by few following step and you can see preview of example that give for add custom validation rule. In this example you are creating <strong class="path">is_odd_string</strong> custom validation rule. .....

By Hardik Savani | March 3, 2016 | | 88182 Viewer | Category : PHP Laravel

How to get maximum key value of array in PHP?

Sometimes, you need to get maximum key value of your array but you try to get with loop and any function etc, but in bellow example you can see we can get biggest key value from our php array by using max() and array_keys(). So, let's try to use in your code this way: <strong>Example:</strong> <pre class="language-php"> $myArray = ['2'=>'Hey','4'=>'Hello','1'=>'Hi','3'=>'GH']; $new_key = max(array_keys($myArray)); $new_val = $myArray[$new_key]; print_r($new_val); </pre>

By Hardik Savani | March 2, 2016 | | 1664 Viewer | Category : PHP

Enable Animate Pull Laravel 4 API inner join GET Ajax Limit Log Activity First Draggable Mailgun API toastr js Redirect xoxco tags input Laravel Eloquent scrollTop Link enableQueryLog Index CURL Event Import refspec Where Not In Query Jquery Plugin Convert intervention/image hasTable preg_match select box search roumen/sitemap Select Flash Message Excel away() Library Configuration Application node.js User Agent Behance API roumen/feed package Notification Image Upload RAND() Twitter Bootstrap Bootstrap Confirmation js plugin Now AngularJS Directive Determine Google Chart Laravel 5.4 - Markdown Mailables popupMultiSelect plugin KCFinder filter_var toSql Bootstrap Star Rating Plugin Listener Script Facebook API dompdf Codeigniter 3 Remember me JSON Subscribe View Old DB gravatar Apache Remove Jquery Dialog Box Moment JS Datepicker Strings gmaps.js Data Paging Ionic framework Homepage Undefined DB::raw() Contact US Form Service Provider Laravel Resource Div Master Sub-Domain thomaswelton/laravel-gravatar tagsinput.js Snippet Pixel Mailchimp API Laravel Environment csrf_token SEO yajra/laravel-datatables-oracle Element Timepicker stevebauman/location composer package Prompt modal Current Page bootstrap-multiselect plugin Demo Laravel Passport Empty CSS Allow Client side validation ajaxComplete Thumbnails Module Column Lightbox ID Search PHPUnit File characters Redis Month Control PayPal Paypal Integration Source Code Join Directory Each Backup guzzle http client Repo Plugins AngularJS Filter Toggle Facade asgardcms Strip Tags Nodejs Composer Codeigniter parse Version Export Cross SUM() uppercase Laravel Factory