Jump to content


My parts won't grow?


  • Please log in to reply
4 replies to this topic

#1 Guest_huey4657_*

Guest_huey4657_*
  • Guests

Posted 11 August 2006 - 09:17 AM

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.

#2 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 11 August 2006 - 09:20 AM

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..........
Why doesn't anyone ever say hi, hey, or whad up world?

#3 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 11 August 2006 - 09:21 AM

lol, made me laugh too.. you might want to rephrase it... lmao

#4 Guest_huey4657_*

Guest_huey4657_*
  • Guests

Posted 11 August 2006 - 09:38 AM

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

#5 Guest_huey4657_*

Guest_huey4657_*
  • Guests

Posted 11 August 2006 - 01:41 PM

Sorry, the problem wasn't the count it was the if(condition).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users