ctype_alnum($testcase);
Category: PHP
PHP & how to trim white space on beginning and the end of each new line with
$text = join("\n", array_map("trim", explode("\n", $text)));
PHP easiest color swap for rows
<style>
.odd{background-color:red;}
</style>
$c = true;
foreach($posts as $post)
echo '<div'.(($c = !$c)?' class="odd"':'').">$post</div>";
Source: https://stackoverflow.com/questions/399137/easiest-way-to-alternate-row-colors-in-php-html