general array q.

Results 1 to 2 of 2

Thread: general array q.

  1. #1
    Join Date
    Dec 1969

    Default general array q.

    Hi<BR><BR>If I have an array with logged in users. How could I fast determine wether or not a username already is in use - in the array?<BR><BR>How do I delete an element of the array?<BR><BR>If the array looked like this:<BR><BR>sebastian<BR>johan<BR>knut<BR>chuck<B R><BR>How could I delete "johan"?<BR><BR>Seb<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: general array q.

    You need to iterate through the arrays using loops and if, then statements.<BR><BR>To find johan in the array:<BR><BR>1. Loop through the array until array(counter) = johan<BR><BR>To delete johan from the array:<BR>1. Loop through the array until if array(counter) = johan<BR>2. then array(counter) = 0<BR>3. Create a new array and loop through it setting each space in the array equal to the first array if array(counter) &#060;&#062; 0.<BR>4. You can then use the new array or copy the second array back to the first.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts