SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Array [] help

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Array [] help

    Hey

    I'm collecting input's from a <form> that come from "select" boxes.

    The name of these checkboxes are "animalsseen[]".. and made as array as you see.

    Now, I want to input the different selected animals into One table field seperated by a coma.

    Could you please help me out.

    Thanks

    Johnny
    signature

  2. #2
    SitePoint Evangelist
    Join Date
    Nov 2001
    Location
    UK
    Posts
    466
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $array_string '';
    foreach(
    $_POST['animalsseen'] AS $sent_input)
    {
    $array_string .= $sent_input.', ';
    }
    $array_string substr($array_string,0,-2); 
    should do ya.
    teckis - that's news to me.


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
  •