开发者

Smarty - a set variable is not displayed when using if isset()

I got the following code:

{$productinfo.ProductPhone} {if isset($productinfo.Productphone)} {$business_business_phone} {$productinfo.ProductPhone} {/if}

The first line is used as a witness and does return the phone number. This value comes from database, so if there's no phone number, I don't want a random "phone:" hanging around (that's the {$business_business_phone} variable to 开发者_C百科handle multiple languages.

My problem is... {$business_business_phone} {$productinfo.ProductPhone} should be displayed since there's a value.


I checked. It was indeed a problem in the database layer. It inserts an empty string. It's fixed :)

Thanks a lot

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜