Skip to main content
source code formatting
Source Link
Adam Spriggs
  • 31.1k
  • 6
  • 44
  • 88

You can use IndexOf() function to do that.

%%[ 
Var @str, @var, @msg 

/* Set the value to check */ 
Set @var = "Dog"  

/* Set the string to check */ 
Set @str = "MyDogIsMyFriend"  

/* Does it match */ 
    if IndexOf(@str,@var) > 0 then 
    Set @msg = "We Found It" 
else  
   else Set @msg = "We didn't Findfind it" 
    endif  

]%% 
 
%%= v%%=v(@msg) =%%

I've been looking for the same solution and I found the answer to the similar question on 3sixty.

You can use IndexOf() function to do that.

%%[ 
Var @str, @var, @msg 

/* Set the value to check */ 
Set @var = "Dog" 
/* Set the string to check */ 
Set @str = "MyDogIsMyFriend" 
/* Does it match */ 
    if IndexOf(@str,@var) > 0 then 
    Set @msg = "We Found It" 
    else Set @msg = "We didn't Find it" 
    endif 
]%% 
 
%%= v(@msg) =%%

I've been looking for the same solution and I found the answer to the similar question on 3sixty.

You can use IndexOf() function to do that.

%%[ 
Var @str, @var, @msg 

/* Set the value to check */ 
Set @var = "Dog"  

/* Set the string to check */ 
Set @str = "MyDogIsMyFriend"  

/* Does it match */ 
if IndexOf(@str,@var) > 0 then 
    Set @msg = "We Found It" 
else  
    Set @msg = "We didn't find it" 
endif  

]%% 
%%=v(@msg)=%%

I've been looking for the same solution and I found the answer to the similar question on 3sixty.

Source Link

You can use IndexOf() function to do that.

%%[ 
Var @str, @var, @msg 

/* Set the value to check */ 
Set @var = "Dog" 
/* Set the string to check */ 
Set @str = "MyDogIsMyFriend" 
/* Does it match */ 
    if IndexOf(@str,@var) > 0 then 
    Set @msg = "We Found It" 
    else Set @msg = "We didn't Find it" 
    endif 
]%% 

%%= v(@msg) =%%

I've been looking for the same solution and I found the answer to the similar question on 3sixty.