Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 26th May 2005, 17:13
minimi minimi is offline
Junior Member
Join Date: May 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Strange behaviour of foreach in PHP 4.3.11

I found a strange behaviour of foreach in PHP 4.3.11. For example, if you have the following code:

PHP Code:
[0] = 'bla';
$elements[1] = 'blubb';

$elements as $element){
it prints

            [0] => bla
            [1] => 0
            [0] => blubb
            [1] => 1
instead of the strings bla and blubb... Is this a bug in PHP 4.3.11?
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 06:49.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.