Simple if…else statement not working (executes both blocks of code)
-
I want to use the following code to display some text at the top of each category page. But, for some reasons, both echo statements are executed. I am new with PHP, it may be something very simple..
<h3> <?php $catTitle=single_cat_title(); if($catTitle == "Alinuta") echo $catTitle; else echo "Banc fara Alinuta"; ?> </h3>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Simple if…else statement not working (executes both blocks of code)’ is closed to new replies.