I am using below code to search string in given string in smarty but below code not working
$MyError = "Attribute";
{if $MyError|strpos:'Attribute Registration Number with value'}
<p>Welcome</p>
{/if}
I am using below code to search string in given string in smarty but below code not working
$MyError = "Attribute";
{if $MyError|strpos:'Attribute Registration Number with value'}
<p>Welcome</p>
{/if}
In Smarty, you can use the PHP function strpos to search a string in given string :
{if strpos('Attribute Registration Number with value', $MyError) !== false}
<p>Welcome</p>
{/if}
Here is an other post about it.