Answer the question
In order to leave comments, you need to log in
What is the best way to make a variable handling method, if, switch, variable?
There is a module that prepares the content that came from the user to the module in the form of variables, depending on the type of content, you need to use one or another module.
Data is coming:
$json_data =
{"mod_type":"text_block", "blocks":
{
"block":"asdasd"
"block2":"asdasd"
.....
}
}
$arr_mod_type = json_decode($json_data)
STATIC::mod_{$arr_mod_type['mod_type']};
Answer the question
In order to leave comments, you need to log in
STATIC::mod_{$arr_mod_type['mod_type']};
how does is called
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question