Skip to content
Advertisement

Tag: arrays

How to filter expanded datasets in json URL?

I am trying to filter results in my json URL’s expanded dataset. I can filter the regular data just fine but I am having issues reaching the expanded data which is being returned as a nested array (I believe). For example I use this url to filter and only display the city Austin: I am able to expand this dataset

Sort Array from object

I have an object and store it in an array. However, when outputting the names from the object, I want to sort them by ‘is_main’. Thereby ‘is_main’ with the value 1 should always be in the first place and then ‘is_main’ with the value 0. Here is the Object And my PHP Code: I hope that someone can help me

How to return the children of an array under the parent?

There is an array, inside each element of the array there is a groupId, some elements of the array have children. How to get this kind of output: Parent category in array: Children category in array: I was able to only return parent categories, how to link child categories, in turn I could not figure out how Answer I’ve been

PHP dynamical value as time() function speed in bigdata

What is the preferred (less memory consuming and fastest) approach to use time() or any similar dynamic value in billion+ iterations? A) B) C) I would personally prefer C) but I don’t know how will PHP use memory, if every iteration is storing time as variable? Is it the same in A) and B)? Answer A is surely the fastest,

Parse through SOAP response

I am a beginner at SOAP and have been trying to figure how to parse through XML response when I call the SOAP API.I have already tried similar questions like this on stackoverflow but somehow they are not working for me. I want to access Village and VillageName tag in a loop . I am using below code to get

Advertisement