Convert any amount to currency format is a tough task. money_format(), which is a custom function provided by PHP, to change any number to currency formats. First you need to define the target locale and then specify the corresponding money format, which will do the trick for you.
Display star ratings using JQuery and CSS sprite
Radio buttons are introduced in html to get predefined answers from users. It is perfect for feedback forms, product ratings and surveys etc. Star ratings are more convenient and attractive way of grabbing users inputs. Most of the eCommerce sites uses the star rating technique which is more comfortable than conventional radio buttons.
Send or communicate data structures from PHP to Javascript using JSON
Labels:
datastructure,
json
0
comments
Usually web servers will send html data to the browser and the rendering engine will start parsing the html code. Nowadays most of the websites work like a web application and will send or receive live data from the server. For this type of interaction, communication of data-structures are required. We all know, the difference between a PHP Array and JavaScript Array is like car is to carpet. So conversion to a common data format is required for this operation. JSON, JavaScript Object Notation, is very light weight and it is globally accepted as a data exchange format. Lets try sending a PHP array from PHP to JavaScript using JSON.
Subscribe to:
Posts (Atom)