SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: php array

  1. #1
    SitePoint Zealot doca's Avatar
    Join Date
    Dec 2004
    Location
    Vienna, AT
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php array

    HI

    How can I read one table wit this content

    Product,Service,Total,blabla,blabla,

    and simple way to get something like this from this table

    $word1 = Product;
    $word2 = Service;
    $word3 = Total;


  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could use explode()

    PHP Code:
    $parts explode(','$string);
    print_r($parts); 
    how to read from a database
    http://us2.php.net/mysql_query

  3. #3
    SitePoint Zealot doca's Avatar
    Join Date
    Dec 2004
    Location
    Vienna, AT
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still dont understand how to get every word I am not profy

  4. #4
    SitePoint Zealot doca's Avatar
    Join Date
    Dec 2004
    Location
    Vienna, AT
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah Thanks clamcrusher

  5. #5
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by doca
    HI

    How can I read one table wit this content

    Product,Service,Total,blabla,blabla,

    and simple way to get something like this from this table

    $word1 = Product;
    $word2 = Service;
    $word3 = Total;


    I hope that Product,Service,Total,blabla,blabla, are your column names, not data stored in a single column. Multiple sets of data should never be stored in a single column of a database, it's bad design.
    ]


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
  •