wip trying to get the var name directly, first try not working

This commit is contained in:
asus
2024-02-07 18:54:30 +01:00
parent b943682047
commit ae5fa7191a
2 changed files with 26 additions and 4 deletions

View File

@@ -44,9 +44,13 @@ function main_shortcode() {
# https://wiki.php.net/rfc/nameof
# but for now i have to declare both the variable and its name
# (more : https://stackoverflow.com/q/255312/9497573)
# add_var_to_front( array(
# "myvar_1" => $myvar_1,
# "myvar_2" => $myvar_2,
# ));
add_var_to_front( array(
"myvar_1" => $myvar_1,
"myvar_2" => $myvar_2,
$myvar_1,
$myvar_2,
));
}