jQuery javascript make an input readonly

May 9, 2014

To make an input readonly, simply use .prop To enable the input

javascript, jQuery convert PHP string to number

May 9, 2014

Working with PHP data inside javascript. Echo or passing a php number in javascript may turn it to be string instead of integer. example:

jQuery UI Tooltip

May 9, 2014

Tooltip is veryuseful for forms,It is used to show some additional information about input fields. HTML Codes

jQuery checked a radio button

May 7, 2014

To check radio button, you may use .attr To remove radio button checked, view this post

jQuery remove radio checked

May 7, 2014

To uncheck radio button, you may use .removeAttr or .attr Or using .removeAttr To checked a radio button, view this post

PHP get array keys only of arrays

April 24, 2014

You can use PHP’s array_keys function to grab the keys: Typical way is loop foreach:

PHP String “0″ or empty issue

April 15, 2014

Given example an empty value of array like: When processed the array and $value = $x->track_value Output value will be always “Manuals”. To fix this issue, add “” into the “1″ or “0″

PHP get latitude and longitude using google maps API

April 15, 2014

Example: Output longitude and latitude which can be very useful for location services. Detailed variable setting see below reference: https://developers.google.com/maps/articles/phpsqlsearch_v3#findnearsql http://stackoverflow.com/questions/8633574/get-latitude-and-longitude-automatically-using-php-api

PHP remove duplicate key or value in multidimensional array

April 15, 2014

Example this multidimensional array having duplicate retailer_id, and we want no duplicate of retailer id in the array although it keep different id information: To clean above: $outputArray is the final clean array. If we want to remove existing key from an array: simply:

PHP trim multiple 00 infront

April 15, 2014

If the number provided is a string, convert it to int and will auto remove the addtional 00: