Search Results

Search found 1 results on 1 pages for 'cbarg'.

Page 1/1 | 1 

  • Make array from $_POST values

    - by cbarg
    Let's start telling that I'm passing an x amount of variables via post from a form. Let's name them menu_category_1, menu_category_2, ..., menu_category_x, plus, maybe, menu_category_new (I'm using an if empty to check this last one variable). To make things easier I'm also sending the parameter $key (amount of variables starting from 0). Now I need to set them into a new variable $menu_category (array), which is going to be imploded and then update my database. How do I set up that new $menu_category variable to be an array containing all my variables named in the beginning? I was thinking of using a for loop but I can't come up with something useful. Thanks!!!

    Read the article

1