SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Pulling info...

  1. #1
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I have some info in a MySQL DB and it has spaces in it..... I have put it into an array, now how do I display it? I have tried echo() and print() any suggestions?
    Thanks,

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So the info is in the array already

    two ways


    for($i=0;$i<count($arrayname);$i++) {
    print $arrayname[$i];
    }

    OR

    while (list($key,$value) = each ($arrayname)) {
    print $value;
    }
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I normally use the first way if the array is not a hashtable (key-value pairs)
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy


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
  •