473,493 Members | 3,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

pushing elementson array with indices

Hi all,

I try to push elements on an array but without succes. I have a for loop and
need to do something like this array_push ($doelpunten, "$myrow[0]" =>
"$myrowDoelpunten[0]"); where myrow[0] is de indice and $myrowDoelpunten[0]
the value. $doelpunten is the array Someone can help me out?

Thanks
Stijn
Jul 17 '05 #1
2 1381
"Gecke R?n" <me*****@hotmail.com> wrote:
I try to push elements on an array but without succes. I have a for loop and
need to do something like this array_push ($doelpunten, "$myrow[0]" =>
"$myrowDoelpunten[0]"); where myrow[0] is de indice and $myrowDoelpunten[0]
the value. $doelpunten is the array Someone can help me out?


Unless you are searching for:
$doelpunten[{$myrow[0]}]=$myrowDoelpunten[0];
give us an example of what the before and after looks like!

--

Daniel Tryba

Jul 17 '05 #2

"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:cj**********@news.tue.nl...
"Gecke R?n" <me*****@hotmail.com> wrote:
I try to push elements on an array but without succes. I have a for loop
and
need to do something like this array_push ($doelpunten, "$myrow[0]" =>
"$myrowDoelpunten[0]"); where myrow[0] is de indice and
$myrowDoelpunten[0]
the value. $doelpunten is the array Someone can help me out?


Unless you are searching for:
$doelpunten[{$myrow[0]}]=$myrowDoelpunten[0];
give us an example of what the before and after looks like!

--

Daniel Tryba


That did the job. Thanks
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3105
by: Steve | last post by:
I'm working on an e-commerce site, and one of the things I need to do is split an existing order into two orders. The problem I'm having is not creating the new order, but getting the remaining...
6
2729
by: Michael Drumheller | last post by:
(If you're not interested in NumArray, please skip this message.) I am new to NumArray and I wonder if someone can help me with array-indexing. Here's the basic situation: Given a rank-2 array...
11
3239
by: Dr John Stockton | last post by:
Q1 : Given an array such as might have been generated by var A = is there a highly effective way of reducing it to - i.e. removing the undefineds and shifting the rest down? ...
9
3423
by: Randell D. | last post by:
Folks, I can program fairly comfortably in PHP and can, for the most part using these skills and others that I've picked up over the years manage to read/understand most code in Javascript... so...
7
2365
by: Adam Hartshorne | last post by:
As a result of a graphics based algorihtms, I have a list of indices to a set of nodes. I want to efficiently identify any node indices that are stored multiple times in the array and the...
22
4569
by: VK | last post by:
A while ago I proposed to update info in the group FAQ section, but I dropped the discussion using the approach "No matter what color the cat is as long as it still hounts the mice". Over the last...
7
1757
by: MBS | last post by:
Greetings. I'm still pretty new to PHP and I have a question. I know that variables are preceeded by a "$" (dollar sign). Typically, a variable has one value, unless it is an array. Then it is...
29
5411
by: shmartonak | last post by:
For maximum portability what should the type of an array index be? Can any integer type be used safely? Or should I only use an unsigned type? Or what? If I'm using pointers to access array...
9
3730
by: dennis.sam | last post by:
Hi, Is there away to define a multi-dimensional array with respect to the number of dimensions the array has? For example, given a user spec of "a b c d", I want to create a 4 dimensional array...
0
6989
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7367
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1400
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.