Jump to content

foreach post

swtscp

I want to make a foreach loop for 187 posts

$_POST['choix'1'] to $_POST['choix'187'] 

in php

Link to comment
Share on other sites

Link to post
Share on other sites

for ($i = 1; $i <= 187; $i++) {    $var = $_POST['choix'.$i];}

 

I don't know if this is what you imagined but at least you have your loop...

Link to comment
Share on other sites

Link to post
Share on other sites

for ($i = 1; $i <= 187; $i++) {    $var = $_POST['choix'.$i];}

I don't know if this is what you imagined but at least you have your loop...

 

 

$POST sounds like OP is trying to use a form of some sort to post data, though w/o more information hard to really help

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

$POST sounds like OP is trying to use a form of some sort to post data, though w/o more information hard to really help

 

That's one hell of a form if it has 187 inputs!  :blink:

Link to comment
Share on other sites

Link to post
Share on other sites

Have any context for this request? Might make it easier to give you a solution (or suggest a better solution).

15" MBP TB

AMD 5800X | Gigabyte Aorus Master | EVGA 2060 KO Ultra | Define 7 || Blade Server: Intel 3570k | GD65 | Corsair C70 | 13TB

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×