Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2nd file:
- <?php
- $test = array();
- function sup() {
- global $test;
- array_push($test, "0");
- }
- //So it wont say 0 because i didnt call sup() yet until the other page which is after the include once
- echo $test[0];
- 1st File:
- <?php
- require_once('test.php');
- sup();
- //now it will say 0
- echo $test[0];
- ?>
Advertisement
Add Comment
Please, Sign In to add comment