A
A
Anton2018-08-08 02:17:15
PHP
Anton, 2018-08-08 02:17:15

How to make such a comparison?

Greetings, there is an example:
{if $variable == 'value'}true{else}false{/if}
How to make it so that if the value of the variable contains value but with an addition, for example, valuedop, so that in my example it is still true

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil Sapegin, 2018-08-08
@boypush

{if strstr($variable, 'value') !== false}true{else}false{/if}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question