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

Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitesp

Java API in PHP?
I have an application that we use internally here at the office.

The software company provide

ob_ dynamic content
i was wondering about the potential to use ob to create a <div then remove it when the page

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

Need help in log in and log out?
hi there all of u. i have recently created a site for someone. i have placed log in and log out and

function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the

Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but....

I'm scraping a ringtone site

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

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