PHP Concatenate many variables and store them into one variable? -


i know if correct way concatenate many dynamic variables , store them 1 variable? dynamic variables contain html. of them may, depending on earlier code, contain nothing.

or there alternatives?

    $specialproductmsg = $garminmsg .= $studdybuddymsg .= $baroncoursemsg .= $fircoursemsg .= $pilotworkshopmsg .= $cfirenewalmsg .= $flightsimmsg .= $xplane11msg .= $ltfcoursemsg; 

you shall do

$specialproductmsg = $garminmsg . $studdybuddymsg . $baroncoursemsg . $fircoursemsg . $pilotworkshopmsg . $cfirenewalmsg . $flightsimmsg . $xplane11msg . $ltfcoursemsg; 

and stored on $specialproductmsg

to concatenate don't use .= in between variables.

you can see more here


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -