|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-03-28 12:40 UTC] jim
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 02:00:02 2025 UTC |
I'm using the latest PHP that Shane compiled yesterday .. I have the following code as part of a class I'm working on .. TEMP is a name, such as "NICK" for example, it finds [NICK], in $this->DATA["TEMPLATE], and SHOULD place it in the array .. But rather, it the aray only contains "Array[0]" .. When using a global variable in the function using Global $VARIABLE;, the array still contains "Array[0]" .. However, it works just fine when I pick a new variable not initilized, and not global .. The array contains "[NICK]" .. Code note working: if (eregi("\[$this->TEMP\]", $this->DATA["TEMPLATE"], $this->TEMP_A)) { echo "<!-- $this->TEMP_A[0] -->"; } Above doesn't work ... echos "Array[0]" if (eregi("\[$this->TEMP\]", $this->DATA["TEMPLATE"], $NEW_ARRAY)) { echo "<!-- $NEW_ARRAY[0] -->"; } Above works .. echos "[NICK]"