samedi 16 mai 2015

forloop in a if statement (PHP)

I have a bit of a problem in PHP. I want to run a forloop in a 'if' statement, but it seems it isn't working. My goal is to show the flag of the Soviet Union if the user ticks a box.

if($soviet){
for( $i = 0; $i < $_POST["aantal_divjes"]; $i ++ ){
echo "<div style='position: absolute;top:" . 100 * $i . "px; background-image: url('http://ift.tt/10gMjRC'); height: "200" px;' >" . $text . "</div>";}}

Thanks!

PS. I'm very new to coding.

Aucun commentaire:

Enregistrer un commentaire