There is a getp () function that returns a string.

$p1 = getp(); //p1 = 'Wd $p2 = getp(); //p2 = Xr' //нужно из $р1 и $р2 создать переменную $р3, $WdXr //чтобы в коде можно было обращаться к $WdXr 

How to do this?

2 answers 2

Something like this:

 $p1 = getp(); //p1 = 'Wd $p2 = getp(); //p2 = Xr' $p3 = $p1 . $p2; 

Call in the code of a variable whose name is stored in $p3 :

$$p3

    The issue is resolved.

     $p1 = 'Wd'; $p2 = 'Xr'; $p3 = "$p1$p2"; $$p3 = 'test'; echo $WdXr; 

    thank you for the links