How to Insert data in Google Spreadsheet using PHP?

Source: Google has been sending out messages saying that several of their APIs are going to be discontinued (for example, the Document List API).  As a result, I tried to modify my custom Google Spreadsheet-populating PHP script to use the new Drive API.  After way too much wasted time, I discovered that the Drive […]

How to move an array Element to any other index?

<?php $array = array(‘a’, ‘b’, ‘c’, ‘d’); function move_array_element(&$array, $element_index, $required_index) { $out = array_splice($array, $element_index, 1); array_splice($array, $required_index, 0, $out); } // Let’s say I want to move Element “d” to index 2 // So first I’ll find it’s index dynamically $element_index =array_search(“d”, $array); $required_index = 1; move_array_element($array, $element_index, $required_index); print_r($array); /* Result: Array […]

how to create custom admin page?

In this article I’ll show how to create custom page for admin panel. <?php // Following code is just example to show how this works. So obviously you can alter this or write your own code for UI // function that will prpeare User Interface for our New Admin Page function az_admin_custom_page() // You can […]

How to setup Google reCaptcha Version 2.0?

To setup Google reCaptcha oepn url and fill form as shown in the screenshot below: After registration open newly created reCaptcha site and read the guide provided by google as shown below: Now paste <script src=’’></script>  in <head> or anywhere before use of captcha. And then paste <div class=”g-recaptcha” data-sitekey=”6LcPQggTAAAAAAw-SQm8KTEW-N1CBuzBz_gW71UT”></div> to the place where you want to show captcha […]

WordPress: How to submit custom form data using Ajax?

In wordpress we send data using same ajax method as we do in regular non-wordpress website.  The difference is few additional data variables and filter on serverside. To Implement this I created a template page named “Request a Quote” in request-a-quote.php, created new wordpress and assigned that template to this page.

PHP: How to search and replace string from complete database using PHP

If you want to search and replace string from entire database (from all tables of any database) using php then use following code. <?php // Find and replace facility for complete MySQL database // // Written by Mark Jackson @ MJDIGITAL // Can be used by anyone – but give me a nod if you […]

MySQL: How to duplicate a row using SQL ?

Use following SQL query to duplicate any single row. Use your own field names to make this working in your case. insert into packages (`field_1`, `field_2`, `field_3`, `field_4`) select `field_1`, `field_2`, `field_3`, `field_4` from packages where id=1