php - declared variable += and a new variable not containing last data of the previous variable -


example:

$variable = somecode;  $variable .= somemorecode;  $variable .= somemoremorecode;   

i want make $variable2 containing somemoremorecode;


notes:

1) whitout rewritting somemoremorecode; part.

2) variables in function, can't declare $variable2 on code part interests me.


q: how can achieve ?

$variable2=somemoremorecode; return $variable2; //because it's in function. 

if have interpreted question, answer. if not, please try make example , share code.


Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -

qt - Microsoft FTP Service 451 The parameter is incorrect -