Jump to content

My parts won't grow?


Guest huey4657

Recommended Posts

Guest huey4657
Hi all,
Does anyone know how to increment a position within an array, these do not work:

Loop
$array[$cnt]++;
$array[$cnt] = $array[$cnt]++;

thks.
Link to comment
Share on other sites

haha sorry but your title made me laugh.

Anyways i dont get what youre trying to do...?

if youre just tryin to set new values you can just use something like

$array = array();
$array[] = "value1";
$array[] = "value2";
$array[] = "value3";
$array[] = "value4";

Then array[0] would be value1 [1] would be value2 and so on..........
Link to comment
Share on other sites

Guest huey4657
Hi,
Basically I have 3 arrays with 18 counters that need updating in a while loop of (max) 300000+ records, the 18 counters increment when there is a match of 1 or 2-3 or >3 (3 arrays) in one field and depending on the other field which = between 1 and 18 that counter increments. So if row 1, field 1 = 1 that be a position in an array, and field 2 = between 2 and 3, the (2-3) array increments in position 1.

And I would like anyhelp in how i can increment a part of an array

Hope this makes sense.

Thnks for any help
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.