Questions tagged [globals]

Refers to a spaces where variables and other items may be accessed from any scope.

335 questions
-3
votes
1 answer

Is it mandatory to use quotes(single quotes & double quotes) around an index while accessing array elements in PHP?

I want authoritative answer for this question or you can say my query. Let's take a look at following three code snippets : First :
PHPFan
  • 4,000
  • 11
  • 50
  • 104
-3
votes
1 answer

Rendering a Global or a Var in a Php echo

I found a good script anti spam robots. To implement it in my dynamic pages I have to paste this code: Since my pages are dynamic, my emails are stored in Globals %%GLOBAL_Email%%
Sergelie
  • 363
  • 1
  • 12
-3
votes
3 answers

Change storage of globals in python

I'd like to change the storage of all globals in a python script, as if I could just write use_this_dict_for_globals(some_dict). They're all prefixed with "g_" so if I could replace "g_" with "some_dict." to change all those variable accesses, this…
-5
votes
1 answer

How to use global to $GLOBALS

I cannot understand GLOBALS ! this time chg SRC for 4.3 to 7.0 ! But I cannot use GLOBALS. Single is ok, but 2 values are not replaced. OLD is globals $chk_data ; NEW is ? $GLOBALS['chk_data'] ;
-6
votes
3 answers

Is there a way to access a variable from a calling function in python?

I'm unsure if this is possible but I was wondering if there is a way to get a variable from an outer scope without passing it as an argument. I've played around with global() and inspect but i'm having issues trying to get the attribute. Here's…
SamHDev
  • 154
  • 11
1 2 3
22
23