Cписок студентов - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.

Name: Cписок студентов fullscreencopyrawdownloadembedprint


Your result can be seen below.

Result of php executing





Full code of Cписок студентов.php

  1. <?php
  2. $number = 0; 
  3. $group = array('Akhmuradov', 'Andrianov', 'Grishkin', 'Ivanov', 'Konnov', 'Miheev', 'Miheichev', 'Starikov', 'Trifonov', 'Shepelev', 'Yusifov');
  4. ?>
  5. <table border = "1">    
  6.     <?php foreach ($group as $a) : ?>  
  7.     <tr>
  8.         <td><?php $number++;
  9.                 echo $number?></td>
  10.     
  11.         <td><?php
  12.                 if ($a == 'Ivanov'){
  13.                 ?><strong><?php
  14.                  echo $a ?></strong></td> <?php
  15.                 }else{
  16.                      echo $a ?></td> <?php
  17.              }
  18.              ?>
  19.     </tr>
  20. <?php endforeach; ?>
  21. </table>
File Description
  • Cписок студентов
  • PHP Code
  • 26 Jan-2021
  • 583 Bytes
You can Share it: