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

How to pass parameter to tag query?
Hi,
I want to get the value of a tag at a specific time (like 10/27/09 15:29:59), I need to giv

gettext translates ALWAYS?
I'm using gettext with the new version of XAMPP (5.3.0) on Windows Seven RTM (build 7600)
gettext

Material Issuing for receiving batch
Dear All experts in MM/ PP,

Material issuing from main stores to factory is currently usi

Security Exception on pages using AJAX
I am getting the exception: attempted to perform an operation not allowed by the security policy on

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

tell csv import script to ignore blank rows?
Hi i have the below script but i get an error if a row is blank ie a return in the csv file at the e

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

Opening Multiple Files/Links in Order.
I want to open links in order/one-by-one and check each for a specific string.

Example:
I

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

Problem assigning value to variable in "IF" function
Does this script makes sense? I am trying to take the value that is set to "authenticat" a

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