JSON SORT WITH PHP


Posted on 16th Feb 2014 07:03 pm by admin

I have two products that I want to sort by say "Id:17, value: xxx" using php
The page will end up looking like this

Part Number Diameter Effective focal back focal cntr thickness edge thickness
Did you know?Explore Trending and Topic pages for more stories like this.
L-AOC000 6.00 10.00 7.52 4.75 3.5

here is the decoded json for the two products ( there are a few hundred products)

{"id":"16","value":"L-AOC000"},{"id":"17","value":"6.00"},{"id":"18","value":"10.00"},{"id":"19","value":"7.52"},{"id":"20","value":"4.75"},{"id":"21","value":"3.50"}

{"id":"16","value":"L-AOC001"},{"id":"17","value":"7.00"},{"id":"18","value":"11.00"},{"id":"19","value":"8.52"},{"id":"20","value":"3.75"},{"id":"21","value":"2.50"}

any help would be appreciated
No comments posted yet

Your Answer:

Login to answer
299 Like 7 Dislike
Previous forums Next forums
Other forums

File upload issues
Hi Guys,

Can anyone see any issues with this code:
Code: $setImage= 'productimages/' . dat

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

Displaying a record from mysql in a simple swf file
Hi,

I have a mysql database containing information I would like to display in my swf.

How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul

Error: SQL Syntax; Line 1
Code:

<?php require "global_settings.php"; ?>
<title&g

Search function
I am looking for some guidance from the experts.

I am trying to create a search function. It

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

php + mysql count consecutive data
I have a database of values and I want to work out how to display them if the values match a consecu

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash