Roych Posted August 21, 2018 Share Posted August 21, 2018 Hello, Im having some problem translating some words in if/else statement. my code: <?php if ($single->fajli->url){ echo " <span <span class='big'>>Velikost: <?= $out = __('Size:'); ?></span><br> <span>{$single->fajli->filesizeStr}</span>"; } else{ echo "<span class='big'><?= $out = __('link:'); ?></span>"; } ?> but expl.: <?= $out = __('Size:'); ?> is not working. It wont show up in frontend nor in my backend, what am I doing wrong? My php is not that good ... I also looked all over the forum but no luck. Thank you R Link to comment Share on other sites More sharing options...
Gideon So Posted August 22, 2018 Share Posted August 22, 2018 Hi, try this: <?php if ($single->fajli->url): ?> <span <span class='big'>>Velikost: <?= __('Size:'); ?></span><br> <span>{$single->fajli->filesizeStr}</span> <?php else: ?> <span class='big'><?= __('link:'); ?></span> <?php endif; ?> 4 Link to comment Share on other sites More sharing options...
Roych Posted August 22, 2018 Author Share Posted August 22, 2018 Hello yes ... ? It works great now. This way I can put double quotes back, so my code is back to original html. Thank you very much ? R Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now