cleaner php code
Posted
by vick
on Stack Overflow
See other posts from Stack Overflow
or by vick
Published on 2010-04-21T20:04:37Z
Indexed on
2010/04/21
21:43 UTC
Read the original article
Hit count: 254
php
if (isset($_GET['sort_by']) && strlen($_GET['sort_by']) > 0)
{
$sort_by = $_GET['sort_by'];
}
else
{
$sort_by = 'desc';
}
how can I rewrite that so it looks cleaner and has less lines.. I love one liners hehe
© Stack Overflow or respective owner