I get the data of: {% evento.data.categorias %}
and I want to treat this information with php.
When I do the php echo "{% evento.data.categorias %}"
the value is perfectly displayed, however I can not go through the string that is shown to check if there is a particular word within that string.
I suppose it will be because he does not recognize that it is a string? Does anyone know what I can do?
I do the following:
<?php
$mystring = "{% evento.data.categorias %}";
$findme = 'Promociones';
$pos = strpos($mystring, $findme);
if ($pos === false) {
echo "La cadena '$findme' no fue encontrada en la cadena '$mystring'";
} else {
echo "La cadena '$findme' fue encontrada en la cadena '$mystring'";
echo " y existe en la posición $pos";
}
?>
And I assure you that the word Promotions is within $ mystring