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
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
145 Like 8 Dislike
Previous forums Next forums
Other forums

Include ("Absolute Path") of a file?
I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that

Does deleting the spmlog directory critical?
Hi Everyone,

Please, hope you could help me. We're having problems with the SAP backup. I

ClientScript.RegisterClientScriptBlock Issue
This is what I haveview plaincopy to clipboardprint?Protected Sub posrback_Click(ByVal sender As Obj

how to populate a drop down box
Hi buddies!

PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar) is begin DOWNLO

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

Supress some serveroutput but not all
Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses d

Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

check how many commas the variable containing the query has between [i]select[/i
Hi...

iv made an sql table that contains id number - name of sql query and an sql query.
T

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