PHP variable in session variable -
i trying utilize session variable this:
$string = 'abc'; $_session[$string]; but access if utilize this:
$_session['abc']; but error this:
notice: undefined index: abc any ideas solve problem? :/
simply calling
$string = 'abc'; $_session[$string]; is not enough. it's becomes available when assign value it.
$string = 'abc'; $_session[$string] = 'test'; echo $_session['abc']; //test also, create sure session_start() called on page you're accessing it.
php session variables
No comments:
Post a Comment