Hello. There is a code

<div class="category_description"> <?php echo $this->category->category_description; ?> </div> 

How to make the div not output if start is present in some url? Thank!

    1 answer 1

    Probably something like this:

     <?php if (strpos(strtolower($_SERVER['REQUEST_URI']),'start')===false) { ?> <div class="category_description"> <?php echo $this->category->category_description; ?> </div> <?php } ?> 
    • Thank! But the code exactly shows the div if there is a start. Tell me how not to show a div if there is a start? - Ivan
    • replaced! == false with == false and worked as it should. It is correct ? Thank! - Ivan
    • Then, in order to work correctly, three must be ===, not two ... if you put two equals ==, then in the case when some start will be met at the very beginning (on the zero character), the value 0 will return (t .e. false) and the code will be shown. - Stanislav