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

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

File upload issues
Hi Guys,

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

Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s

"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql

Saas with SAP R/3
hi experts,

Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

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

Staff Induction System - No idea where to go from here!!!
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

Redistributing dependent dlls
Hai all ,

I have created an application in VC++ using VS2008 in a development machine which r

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