SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Copying a recordset

    Hi,

    What's the best way to copy all records in a recordset after a SELECT statement into a multidimensional array? I'm thinking about a FOR loop inside another FOR loop, but I hope there's something faster.

    Is there?
    /(bb|[^b]{2})/ - Shakespeare.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    while ($row mysql_fetch_array($sql_result))
      
    $rows[] = $row

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.
    /(bb|[^b]{2})/ - Shakespeare.


Bookmarks

Posting Permissions

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