Calling a function before it's defined | PHP

somsteeriCoRe

New Member
Is there any possible way when in one file - please note, just one file. To call a function when it isn't defined yet, e.g.\[code\]<?phpecho global_title();function global_title(){ $title = $_GET['name']; return $title;}?>\[/code\]I don't know how to explain this, but it's not quite possible isn't it? What about variable from another file (without including it) can be called in a different file, e.g.config.php\[code\]<?php$db = "localhost";?> \[/code\]index.php\[code\]<?php// I do not want it to be accessed by including it or using sessionsecho $db;?>\[/code\]Know what I mean? :)
 
Back
Top