Sudarshan Taparia Sudarshan Taparia - 2 years ago 83
PHP Question

PHP :Initializing elements of session array

I have created a session array as


I wish to initialize first 5 elements of this to 0.How it can be done?

Answer Source

As every on suggested above, try this:-


$_SESSION['yans'] = array('A','B','C','D','E');
echo "<pre/>";print_r($_SESSION);die;



Note:- it's a simple example given for your understanding. thanks.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download