How to register a variable in PHP session?



How to register a variable in PHP session?..

Answer / Kamini Jadon

To register a variable in a PHP session, you can use the $_SESSION superglobal array. Here's an example:n$$myVariable = 'example value';n$_SESSION['myVariable'] = $$myVariable;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Hello Friends,I am seeking for a job in php having 9 months. exp.Please suggest any company openings.

1 Answers  


Explain about getters and setters in php?

1 Answers  


Name the Functions in IMAP, POP3 AND LDAP?

2 Answers  


Which database is best for php?

1 Answers  


Where is my php ini file?

1 Answers  


Why ide is recommended for use while programming with php?

1 Answers  


we have two tables first one is EMPLOYEE having EmpID, EmpNAME, Second table is SALARY table having id, salary Write a query to get name of those person who having more than 10000$ salary

3 Answers   Net Solution,


What is is_null() in php?

1 Answers  


How can we encrpt a text?

3 Answers  


•What is the difference between “mysql_fetch_array” and “mysql_fetch_object?

2 Answers   Infotech,


What are the encryption techniques in php?

1 Answers  


Why laravel is the best php framework in 2019?

1 Answers  


Categories