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

java - How to compare two classes -

javascript - Why Selenium can't find an element that is graphically visible -

c# - Get the Class name in a class with atribute inside a attribute method -