[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Working with strings!

Very easy question!

How to combine two strings;

I've got one string like which is "25" and second string like "3" how can I put them together and get "253" insted of "28"

Thank you!!!
0
g00r00
Asked:
g00r00
  • 2
1 Solution
 
BatalfCommented:
example:

$a = "25";
$b = "3";

$c = $a.$b;

echo $c;

use "." for concatination instead of "+" which is for arithmetic.
0
 
g00r00Author Commented:
what if I need to put "_" betwin them, so they would look like

25_3

0
 
BatalfCommented:
Example

$a = "25";
$b = "3";

$c = $a."_".$b;

echo $c;
0
 
gerodimCommented:
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now