Adding to the next element in a multidimensional array


Posted on 16th Feb 2014 07:03 pm by admin

Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spot in the field_spaces array. Always adding to the next spot. I'll be calling this in a for loop to add things in there... Can anyone offer a hand?

$node->field_spaces (array)
$node->field_spaces[0] (array)
$node->field_spaces[0]['nid']

Thank you

No comments posted yet

Your Answer:

Login to answer
193 Like 29 Dislike
Previous forums Next forums
Other forums

please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

show random images
hey guys

can someone please suggest a way in which the following code can be edited so it onl

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

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

how can i make a .gif images for my site
Dear Friends ,

Pls solve my problem , I am starting making new site but i dont know how can i

PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and edu

Recognising Revenue daily
Hello.
Has anyone come across daily recognition of deferred income?
We want to implement 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