Home » Php » javascript – How to use SQL Data and IF statements in AngularJS

javascript – How to use SQL Data and IF statements in AngularJS

Posted by: admin February 25, 2020 Leave a comment

Questions:

Would like to use my code in AngularJS, but i don’t know how to use that. My PHP code is here. I don’t know how to “convert” that AngularJS.

<ul>
<?php while($row1 = mysqli_fetch_array($result)){ 
    $team = $row1['team']; 
    $status = $row1['status']; 
    $id = $row1['id']; 
    $priority = $row1['priority'];

    $input = str_replace("/", " ", $team);
    $textlines3 = explode(" ", $team);
    $online1 = $textlines3[0];
    $online2 = $textlines3[2];
    $online3 = $textlines3[4];

if($status == 'Active'){ for ($i=0; $i<1; $i++){
    if($priority == 'LOW'){
        if((($online1 == 'Kiirabi')||($online2 == 'Kiirabi')||($online3 == 'Kiirabi'))){ ?>    
            <li>
                <?php echo $id ?>
            </li>
    <?php } if((($online1 == 'PPA')||($online2 == 'PPA')||($online3 == 'PPA'))){ ?>    
            <li>
                <?php echo $id ?>
            </li>
    <?php } if((($online1 == 'Pääste')||($online2 == 'Pääste')||($online3 == 'Pääste'))){ ?>    
            <li>
                <?php echo $id ?>
            </li>
    <?php }
          } 
    ?>
</ul> 
How to&Answers: