Hi, I have a for loop in which a variable $privid reads and stores the content from a xmlfile in the form of a string.. the string has 5 different values...
I want to call this variable $privid outside the loop like this... for($y_au=0; $y_au<sizeof($priv); $y_au++) { $this->privid = $childNodes[$y]->content ; print $this->privid; // here the variale privid stores and prints all the 5 values as a string.. } function id() { print $this->privid; // here only the last value of in the string is being printed ..WHY??? and how can I resolve this?? return $this->privid; // RETURNS ONLY THE LAST VALUE IN THE STRING.. Why?? } Thanks in adv.:) sands p.S: I tried using an array within the for loop (had posted yest about it..) but makes no diff.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]