0
votes
2answers
28 views

Accessing Object within Array

I have the following output: Array ( [0] => stdClass Object ( [id] => 20 [news_title] => Startup finance docs in GitHub [news_url] => ...
0
votes
1answer
33 views

setting an array as a session variable in php and then accessing it

If I have an array: $resultArr = pg_fetch_array($result,NULL); and at the top of my php code I declare: $_SESSION['resultArr'] = $resultArr; Why can't I access the array elements like so: for($i ...
-5
votes
2answers
37 views

How to find dates in array? [closed]

How to find dates in array from certain month? Array structure is: Array ( [0] => 2013-05-23 [1] => 2013-05-24 [2] => 2013-05-25 [3] => 2013-05-26 [4] ...
0
votes
2answers
39 views

SQL Results as PHP Array

I am trying to solve this. Maybe this is absolutly incorrect, I need some help. I have a table like this: INSERT INTO `municipios` (`id`, `provincia`, `municipio`) VALUES (1, 1, 'Alegría-Dulantzi'), ...
0
votes
2answers
43 views

How do I add two strings together in PHP?

Say you have this array with the following inputs: $relations["fname"] = 'firstname'; $relations["lname"] = 'lastname'; Now I would like to input the two above values into the following (I know the ...
0
votes
1answer
21 views

Accessing database value with twig

Currently in in my php I have this: $vals['followers'][] = R::find('follow', 'following_id=?', array($_GET['id'])); I get a return of all followers in the "follow" table with a following_id of the ...
2
votes
8answers
82 views

Access PHP Array - name defined by $_GET

I'm currently stuck with accessing an array, where the name of the array is defined by $_GET. If I have the following arrays: $test = array('Hello', 'Apples', 'Green'); $AnotherArray = array('Blue', ...
1
vote
4answers
41 views

Best way to slice multidimensional array on the basis of keys in PHP?

I have an result array like this:- $array = array( 'key1' => array('...'), 'key2' => array('...'), 'key3' => array('...'), ...
0
votes
2answers
45 views

jQuery: get element inside object

So, I've got this code: function popAreaTree() { var tree = $("ol.tree"); var list1 = tree.children('li'); var list2 = list1.children('ol').children('li'); ...
-2
votes
1answer
23 views

Want to echo from a Array produced by JSON response of Twitter API

Here is my Array Array([ids] => Array ( [0] => 989422512 [1] => 354847710 [2] => 273809946 [3] => ...
-1
votes
3answers
54 views

How to get random number from array by percentage php

Now i have 5 numbers in array and i need to print random of numbers in array by percentage to each number $array = array(1,2,3,4,5); $percent = array(5,2,3,40,50); The number 1 will print 5 time ...
0
votes
0answers
15 views

MongoDB PHP two array levels query

I'm finding difficulties to get a specific field from my database. here's the structure: "Start" : [ [ { "A" : "blabla" }, { "B" : [ [ { ...
0
votes
0answers
32 views

PHP Array, need to echo LiveLeak video information from an array [closed]

Im working on a project and i got a little stuck, and it isn't that hard properly. Here is my array: Array ( [0] => Array ( [property] => [content] => text/html; charset=utf-8 ) [1] => ...
0
votes
3answers
46 views

sort array on clothing sizes (multidimensional array)

My array looks like this: Array ( [0] => Array ( [id] => 613 [kleur] => royalblauw/wit [maat] => maat XL [voorraad] => 100 ...
-2
votes
3answers
27 views

Extract a part of keys values in array php

For some reason I have a array of this kind, and I want to extract the 2 first part of each key,Some of the key contain 5 pieces of string separated by ',' while other contain 2 pieces of string ...

1 2 3 4 5 1029
15 30 50 per page