On 11/22/2010 05:16 PM, William Attwood wrote:
> There is no code, attached. It's an empty file. That could explain it.
Would indeed. Apparent .php is a dangerous attachment. Here's the
code. Basically I found the problem. PHP is trying to cast my string
as a number, and so any string is always equal to zero. Brilliant. PHP
rocks!
$p= Array
(
"expid" => "Experiment Blah",
"date" => "Fall 2010",
0 => Array
(
"unknown" => "SO3",
"num_samples" => 0
)
);
foreach ($p as $k=>$v) {
print("$k: $v\n");
if($k == "expid") {
print("$k is expid\n");
}
}
if (0 == "hi") {
print "Somehow 0 == hi\n";
}
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/