sql server - How to edit this php function? -


how edit: 'char_transfertime' => $data['transfertime'],

because display example: 2013-08-19 18:55:00 when it's null want display n/a

ps. it's getting data mssql 2005 database (transfertime row in table)

will appreciated.

use php's ternary operator is_null() or isset()

'char_transfertime' => ((is_null($data['transfertime']))      ? 'n/a'      : $data['transfertime']), 

Comments

Popular posts from this blog

Using 'OR' and 'AND' in SQL Server -

python - Finding intersection between ellipse and a line -

c++ - NetBeans Remote Development with additional configuration -