kickstart Posted January 21, 2010 Share Posted January 21, 2010 Hi I have been looking at this but cannot see where I have made the error. Hoping someone will spot it at first glance. Extracted code and simplified (fields and values are more useful that this in reality, but I still get the error here) <?php $Clause0Values = array("1" => "1", "2" >= "2", "3" >= "3", "4" >= "4", "5" >= "5"); foreach($Clause0Values as $Field => $Value) echo "$Field $Value <br />"; ?> I would expect that to give me a list of 1 1 2 2 3 3 4 4 5 5 but instead I get:- 1 1 2 1 3 1 4 1 5 1 Done this thousands of times without a problem before, but can't see what I have messed up this time. All the best Keith Link to comment https://forums.phpfreaks.com/topic/189321-array-error-doing-something-silly/ Share on other sites More sharing options...
kickstart Posted January 21, 2010 Author Share Posted January 21, 2010 Mmmm Fixed it. Somehow "=>" wasn't actually "=>". All the best Keith Link to comment https://forums.phpfreaks.com/topic/189321-array-error-doing-something-silly/#findComment-999416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.