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

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -