+ 2
Is it not must to put double quotes for constant value declaration?
b'coz question is given as<?phpdefine("AGE",28)?>is this correct???.....
7 odpowiedzi
+ 1
When it's an integer, quotes are not necessary.
// These are acceptable:
define("AGE", 28);
define("AGE", "28");
However, quotes are needed for string values.
// This will throw an error:
define("AGE", Twenty Eight);
// This is acceptable:
define("AGE", "Twenty Eight");
0
Yes its correct you can now do as example: echo AGE; //note no $ variable sign
0
thank u glenn
0
ok
0
thanx day....
0
👍
- 1
dude u should put value as double quotes as define("AGE","25");