bbunlock Posted August 2, 2010 Share Posted August 2, 2010 I know this is simple but for the life of me I cannot remember how it is done and cant find it anywhere, ive even gone throught loads of my scripts to see an example but cant find it ok I want to update a $value to include more info, for exxample $value = "value1" then alter in the code I want to be able to add to this like so $value = $value + " - value2" $value = $value + " - value3" and when I do an "echo $value" it would show value1 - value2 - value3 etc can anyone tell me how this is done, I have seen it done before but cannot for the life of me find it and I have no idea what I would even search for any help is much appriciated regards wayne Link to comment https://forums.phpfreaks.com/topic/209605-how-to-update-a-value/ Share on other sites More sharing options...
wildteen88 Posted August 2, 2010 Share Posted August 2, 2010 You'd use the concatenation operator (a period .) instead of a + Link to comment https://forums.phpfreaks.com/topic/209605-how-to-update-a-value/#findComment-1094253 Share on other sites More sharing options...
radar Posted August 2, 2010 Share Posted August 2, 2010 can also use .= ie: $value .= ' - value 2'; Link to comment https://forums.phpfreaks.com/topic/209605-how-to-update-a-value/#findComment-1094255 Share on other sites More sharing options...
bbunlock Posted August 2, 2010 Author Share Posted August 2, 2010 thanks for the help guys, love this place wayne Link to comment https://forums.phpfreaks.com/topic/209605-how-to-update-a-value/#findComment-1094292 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.