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

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -