0
This is the file with the variable I want.
# pt/lang.php
<?PHP
$rp_lang = "pt";
?>
This is the file I want to insert but I want the variable to change the ending either to "pt" or "en" or any other.
# inc/saudacao_pt.php
<?PHP
$rp_saudacao = "Olá bom dia";
?>
This is the file that comes out.
# pt/index.php
<?php
include_once '../pt/lang.php';
include_once '../inc/saudacao_".$rp_lang.".php';
?>
Replace ".$rp_lang."
by "pt" works perfectly.
Is there an error? Does not give the expected result? Give more details. Tried to use parentheses in the name? I don’t know PHP is kind of weird. really you’re using apostrophe and quotes mixed like this?
– Maniero
yes I put parentheses wrote folder by writing her name is en I will change the post
– Ricardo Jorge Pardal
No error simply does not assume the "saudacao_pt.php" folder and all its contents but replaces ". $rp_lang." by "pt" in "index.php" works perfectly.
– Ricardo Jorge Pardal