Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP configuration problem??? foreach not working properly

Status
Not open for further replies.

zeeshan12

Programmer
Jan 5, 2006
12
GB
Hey,
I have got PHP 4.3.10 Installed on my local system (windows) and server (Fedora).

foreach loop runs perfectly on my local system but it gives me problems on the server.

here is a sample code.


$FilenameParameters1 = array('ar', 'bg', 'bc', 'far');
foreach ($FilenameParameters1 as $key) {
echo $key;
}


on local system it prints the values
"ar bg bc far"

but on the server it prints
"Array Array Array Array"

it works fine if i change $key to $k=>$key in the loop. Because of that i'm not able to run any libraries or classes downloaded from the internet.

please HELP me sort this out.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top