* Thus wrote Eric Boerner ([EMAIL PROTECTED]):
> I am having a problem with a nested if statement in php. Everything
> works fine, but it doesn't display the information that I am trying to
> retrieve using a second if statement.
>
> CODE:
>
> if (($fr == 'FR') && ($xe == 'XE') && ($co == 'CO')) { print
> "Statement";
> } elseif (($ag == 'AG') && ($rz == 'RZ') && ($sa == 'SA')) {
> print "Additional Statement";
> if ($sr == 'SR') { print "More Info"; }
> print "Line continuation";
> if (($rx == 'RX') && ($rj == 'RJ') && ($rr == 'RR') &&
> ($rd == 'RD') && ($ra == 'RA')) { print "additional information"; }
Not much I can tell ya except that you might be getting lost in
what is in an else vs. what is in the if
<?php
if (($fr == 'FR') &&
($xe == 'XE') &&
($co == 'CO')) {
print "Statement";
} elseif (
($ag == 'AG') &&
($rz == 'RZ') &&
($sa == 'SA')) {
print "Additional Statement";
if ($sr == 'SR') {
print "More Info";
}
print "Line continuation";
if (($rx == 'RX') &&
($rj == 'RJ') &&
($rr == 'RR') &&
($rd == 'RD') &&
($ra == 'RA')) {
print "additional information";
}
// Everything works except this nested if statement -
// No php error, it just doesn't display the information
print "</font></td></tr><tr>";
} else {
print "other information if false";
}
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php