We know that there are two methods for php to write variables in the array. the prompt is that you have written a [name], so there will be Notice: Useofundefinedconstantname.
We know that there are two methods for php to write variables in the array. we will see this prompt that you have written a [name], so there will be a Notice: Use of undefined constant name-assumed name prompt, the solution is described below.
Close the PHP prompt and search for php. ini:
Change error_reporting = E_ALL to error_reporting = E_ALL &~ E_NOTICE
Another way to do this is to add
Error_reporting (0); although it is difficult to solve the problem, if you do not have the permission to modify php. ini, you can refer to my method to solve the problem. source file:
- $ Room [name] = $ Name;
- $ Room [retailrate] = $ RetailRate;
Change
- $ Room ['name'] = $ name;
- $ Room ['retailrate'] = $ retailrate;