0

Fellow Sololearners I need help with php, I don't get what's happening here

<?php define("MSG", "Hi SoloLearners!"); echo MSG; // Outputs "Hi SoloLearners!" ?>

23rd Apr 2020, 3:32 AM
Sarah Juma
Sarah Juma - avatar
3 odpowiedzi
+ 1
define(identifier, constant_value) This is a way to create a constant. https://www.php.net/manual/en/language.constants.syntax.php
23rd Apr 2020, 3:55 AM
ChaoticDawg
ChaoticDawg - avatar
0
ChaoticDawg , so what's the constant here?
23rd Apr 2020, 12:05 PM
Sarah Juma
Sarah Juma - avatar
0
It would be similar to: const MSG = "Hi SoloLearners!"; Review the provided link it should answer your questions.
23rd Apr 2020, 4:59 PM
ChaoticDawg
ChaoticDawg - avatar