php adding variables to strings code example Example 1: how to add two string in php Remember dot . Example 2: add more data to variable php $a = "Hello "; $a .= "World!";