dsaba Posted June 28, 2007 Share Posted June 28, 2007 If do I do this: define('CONSTANT', 'hello world'); function output_constant() { echo CONSTANT; } will it echo 'hello world' ??? If I define constants outside of functions, can the be accessed and used inside of them?? Link to comment https://forums.phpfreaks.com/topic/57522-solved-can-constants-be-used-inside-of-functions-are-they-global/ Share on other sites More sharing options...
dsaba Posted June 28, 2007 Author Share Posted June 28, 2007 solved you can! Link to comment https://forums.phpfreaks.com/topic/57522-solved-can-constants-be-used-inside-of-functions-are-they-global/#findComment-284645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.