Results 1 to 4 of 4

Thread: [Resolved]mysql to array

  1. #1

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909

    [Resolved]mysql to array

    Ok I make a query in mysql:

    "SELECT * FROM ibf_moderators WHERE forum_id='".$class->forum['id']."'"

    and then I want to load the each of the id column values from ibf_moderators in my $cc_array.

    $cc_array = array();

    while( $r = mysql_fetch_array($result2))
    {
    ADD VALUE into the array here
    }

    How do I loop through my results adding the id column into my $cc_array?
    Last edited by stickman373; Mar 9th, 2003 at 11:48 AM.

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Re: mysql to array

    Originally posted by stickman373
    ...
    Code:
    while($r = mysql_fetch_array($result2)) {
     $cc_array[] = $r['value'];
    }
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909
    thanks for the help
    Last edited by stickman373; Mar 4th, 2003 at 08:34 PM.

  4. #4
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Could you please add "[resolved]" to the main title?

    thanks...

Posting Permissions

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



Click Here to Expand Forum to Full Width