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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -