Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

going through arrays PHP

I want know how i can extract the next ‘team_name’ from an array (30 difrent names) i know its probably simple, but I am beginer

for ($i=1; $i <= $row['number_of_grups']; $i++) 
{ 
    echo "<div class='grup'> <p> GRUPA ".$i." </p>";
    for ($a=0; $a < $teams_for_grup; $a++) 
    {
        $team_input_name = "Druzyna" . $team_number_for_grups;
        $team_number_for_grups++;
        echo "<div class='teams'><a>".$row0['team_name']."</a><input type='number' class='points-box' name='".$team_input_name."' value='".$row0['points']."'</div>";
    }
    echo "</div>";
}

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Without seeing the array for sure it will be hard to tell, but based off what I see here it looks like you would want to be doing:
$row[$a]['team_name']

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading