I have a PHP-based shopping cart, and an auto-feed generator that allows me to insert PHP code to solve for custom fields that it uses in generating feeds for comparison shopping sites.
I am not a PHP programmer, and so Im having trouble with what is a very simple piece of code. I took the following code (which DOES work):
if ($data[free_shipping] == Y) {
$field_value = Free Shipping!;
} else {
$field_value = Fast Reliable Shipping;
}
And modified it as follows (this one does NOT work):
if ($data[league] == NFL) {
$field_value = Football;
} else {
$field_value = Baseball;
}
What am I doing wrong? The code above returns Baseball every time.
Can anyone help?
Thanks!!!!
I have a PHP-based shopping cart, and an auto-feed generator that allows me to insert PHP code to solve for custom fields that it uses in generating feeds for comparison shopping sites.
I am not a PHP programmer, and so Im having trouble with what is a very simple piece of code. I took the following code (which DOES work):
if ($data[free_shipping] == Y) {
$field_value = Free Shipping!;
} else {
$field_value = Fast Reliable Shipping;
}
And modified it as follows (this one does NOT work):
if ($data[league] == NFL) {
$field_value = Football;
} else {
$field_value = Baseball;
}
What am I doing wrong? The code above returns Baseball every time.
Can anyone help?
Thanks!!!!
|
|
Search Webmaster Help and Solution
Simple PHP code helpRelated ItemsQuery failed: connection to localhost:3354 failed (errno=111, msg=Connection refused). |
