Jump to content

Array error. Doing something silly


kickstart

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.