gigantorTRON Posted October 1, 2007 Share Posted October 1, 2007 Okay... so you can add data to the end of a string using ".=" .. is there a way to add data to the beginning of a string?? Quote Link to comment https://forums.phpfreaks.com/topic/71418-simple-question/ Share on other sites More sharing options...
iPixel Posted October 1, 2007 Share Posted October 1, 2007 all i can think of right now is assigning whatever date to a different variable and then concatinate the 2. $string = $var2 . $var1 $var2 being what u want in front Quote Link to comment https://forums.phpfreaks.com/topic/71418-simple-question/#findComment-359489 Share on other sites More sharing options...
NoSalt Posted October 1, 2007 Share Posted October 1, 2007 If you really want to be dangerous you can knock out your first variable in lieu of the new variable. $var_01 = "Wars"; $var_02 = "Star"; $var_01 = $var_02 . " " . $var_01; print $var_02; // will print out "Star Wars" Quote Link to comment https://forums.phpfreaks.com/topic/71418-simple-question/#findComment-359545 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.