Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----- The Code -----
- <?php
- $test = array();
- function sup() {
- global $test;
- array_push($test, "0");
- }
- echo "If it works it will say 0 : ";
- echo $test[0];
- echo "<br>Now we will push again and it will work but its not in a function: ";
- array_push($test, "0");
- echo $test[0];
- ?>
- ----- The Result -----
- If it works it will say 0 :
- Now we will push again and it will work but its not in a function: 0
Advertisement
Add Comment
Please, Sign In to add comment