![]() |
|
#1
|
|||
|
|||
Odd Variable IssueIt has been a long time since I have posted here but I have an interesting issue. I am working on a php script that I wrote and have used for some time. Today I added an array just like normal but when I try to do anything with the array it won't work. See below for the code.
Code:
I thought maybie it was the integers but it's not I tried strings to I can't even echo part of the array to the string. I guess maybe its just monday. Any ideas? Nick |
|||
|
#2
|
|||
|
|||
|
Solved my own problem. I am used to using perl not php so I assumed global variables live tell the end of the program. I guess if you enter a function you must pass variables to it, the global variables are inaccessable here.
Nick |
|
#3
|
||||
|
||||
|
Hey Nick, it's been a WHILE...
Sorry I couldn't help you sooner but these days, I only have a couple of hours per day to do stuff online. BTW, you can also use $GLOBALS['variable_name'] inside functions to access variables that were created outside. It's just another way (which is useful to know), so don't take it as a recommendation, suggestion or anything like that... __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Issue with stacks | CronoX | C++ Forum | 10 | 10-Mar-2004 14:30 |
| Having problems displaying a line of variable length using winio. | warny_maelstrom | C Programming Language | 8 | 15-Feb-2004 11:56 |
| Keeping track of a private variable outside the class | viperv80 | C++ Forum | 1 | 03-Dec-2003 17:25 |
| setiosflags issue | dcj1978 | C++ Forum | 1 | 08-Aug-2003 05:16 |
| Php bbcode issue | Caged | MySQL / PHP Forum | 3 | 06-Aug-2003 18:55 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The