Selected from Linux Selected from PHP
- Ubuntu 17.10 Install google's mod pagespeed for apache - PHP-Ubuntu-Youtube-dl simple script for converting and downloading youtube video or mp3
- Ubuntu SSH tunnel via proxy - PHP while loop with every row with a different color
- Install GoAccess Apache Log Analyzer Tool on Ubuntu 17.10 - PHP use while loop in function
- SSHFS and map folder with a proxy - PHP List Files And Folders As links
- How to connect to SSH server with a proxy - PHP Extract Text From String
➥ PHP while loop with every row with a different color
Added by sonik on 02-05-2017 and keywords: php, while, loop, different, color, row, script [ Print Article ]
Идеята е много проста, ако се дели на две е един цвят ако не друг.

$i=1; // част от кода за правене на редовете с различен цвят

while($row = mysqli_fetch_assoc($query)){

if($i%2==0) { echo '<tr bgcolor="#FFFFFF">'; } else { echo '<tr bgcolor="#EFF0F1">'; } $i++; // част от кода за правене на редовете с различен цвят

echo '<td>'.$isp.'</td>';
echo '<td>'.$ref.'</td></tr>';

}

@All rights reserved with Copyright Webleit.info 2018 by Sonik_Blast [ Site Map ] [ RSS ] [ YouTube Mp3 Downloader and converter ]