Jump to content
MakeWebGames

PHP string on string


Recommended Posts

Posted

I use this alot on many mods and think it would be usefull for others building mods.

 

//first open up a string
$string="Hello";
//Add to string
$string.=" World";
//Inputs
Hello World

 

Pretty cool eh?

heres another example that might be useful

//Open Up a string
$string="";
//Add to it
$string.="Savager";
//Add more to it
$string.=" Is";
//And more again, and again. etc...
$string.=" The Bomb";
//Finally Outputs
Savager Is The Bomb

 

Think of the dot as a + sign

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...