Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Probably an easy one... :)

Probably an easy one... :)

Views: 581

Results 1 to 2 of 2
25 Feb 2014, 3:29 AM
#1
the_mech avatar

the_mech

New Zenner

Join Date:
Feb 2012
Posts:
67
Plugin Contributions:
0

Probably an easy one... :)

echo TEXT_PRODUCT_OPTIONS; 
if  ($options_name[$i] == "test") {
echo "works";
} else {
echo $options_name[$i];
}

Why doesn't this work? The output looks like " test " but the character is more than just a blank.

Thanks!

25 Feb 2014, 3:43 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Probably an easy one... :)

Can we see this happening live? Is it possible that you added a space at the end of the option name when creating it? Not sure if that would cause a mismatch, but it couldn't hurt to check. Maybe you can look straight into the database table to see the value of that field.

And what "character is more than just a blank"?