How to use define in php -
How to use define in php -
i've array key value pair re-written in number of places in whole project. so, define @ 1 place , utilize it.
the array array('isvalid'=>'false','message'=>'invalid login credentials, please seek again');
i tried way, didn't worked define ('kcheckvalidusersuccessresponse',array('isvalid'=>'false','message'=>'invalid login credentials, please seek again'));
defining array @ top , utilize it, how value not available when echoed it. echo kcheckvalidusersuccessresponse
;
any help appreciated.
constants may evaluate scalar values
class error { public $my_error1 = array( 'isvalid'=>'false', 'message'=>'invalid login credentials, please seek again' ); } $error = new error(); print_r($error->my_error1);
from can phone call error in of code familiar oop programming
php
Comments
Post a Comment