I have a array that contains continent and with countries. [php] Array ( [0] => Array ( [continent_name] => asia [country_name] => pakistan [country_value] => 1 ) [1] => Array ( [continent_name] => asia [country_name] => india [country_value] => 2 ) [2] => Array ( [continent_name] => asia [country_name] =>
Post in
make $wpdb global variable [php] global $wpdb; //NOW GET YOUR WORDPRESS DATABASE TABLE PREFIX $prefix = $wpdb->base_prefix; ///`WP_` IS DEFAULT PREFIX [/php
Post in
Many times we need to store #array in #database with because may we don’t want to create all specified fields with names in #database table, so we just inserted, and here is example that I want to save whole #array data in database table field mysql. [php] $save_array = array(
Post in
I was also faced that problem the unchecked checkboxes cannot submit the data when submit form, so I decided to a write a jquery, here is my html [html] <input type="checkbox" value="1" checked="checked" named="checked_checkbox" /> <input type="checkbox" value="1" named="un_checked_checkbox" /> [/html] When I using print_r($_POST) ; its just return [php]
this function allow you to generate random characters code,function suitable for Generate activation code for newly user account Generate shortenURL code, Generate temporary user password for changing password of account. [php] function generate_special_pass($pass_len = 8, $allow_special_chrs = true) { $allow_chrs = ‘ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz’; $special_chrs = ‘!@#$%^&*()_+’; if($allow_special_chrs) { $pass_chrs = $allow_chrs.$special_chrs;
Post in
Mostly the largest social networks like #facebook , #twitter , #soundcloud and other application are using #hashtag functionality to sort their data and live-feed or content. So I have wrote this tutorial to convert # from content and convert into a #hashtag 1. Define function named sdtutshashtag with a single parameter $post_content In $post_content
In my office where i do job, i am working on various organization’s projects developed in wordpress and using many of plugins to complete projects sometimes i am think that i will wrote a article about plugins to users can use them on their wordpress site, to save their times
Post in
Get last day of month with php date. [php] echo date(‘t’,strtotime(’25-02-2016′)); //its return 29 echo date(‘t’,strtotime(’25-02-2015′)); //its return 28 echo date(‘t’,strtotime(’11-10-2015′)); //its return 30 [/php] Get Frist day of month. [php] echo date(‘D’,strtotime(’01-11-2013′)); //its return 01 [/php
Post in
The wordpress user’s password hashing is very strong you cannot manually match the entered password with stored in db password because every single time wordpress generate password with random characters, so here is a function to match the wordpress user login password for login functionality or change password functionality in your
Post in
This function get_metadata is useful when needs to get alot of post_meta of post or page. Because if get post meta one by one from get_postmeta function then get_postmeta will consume too much time. [php] $post_id = get_the_ID(); $all_post_meta = get_metadata( ‘post’, $post_id, ”, true); [/php
Post in
TOP COMMENTED
laravel remove public from url
This is weird thing from #laravel on fresh installation, so…
3 comments
Pakistani Web Designer’s Web Designing…
Web Design Illustrations - IdealHut.com by Design-Maker…
2 comments
MEASURE UNITS PX, CM, IN, MM CONVERSION…
[php]function measure_conversation($value = null, $measurein = null, $returnin = 'px',…
2 comments
28 Android IOS Mobile Application Frameworks
jQuery Mobile Ionic: Advanced HTML5 Hybrid Mobile App Framework Mobile…
2 comments
20 jQuery HTML5 Video Player for Website
Video.js The Player Framework MediaElement.js - HTML5 video player Create…
2 comments