Appending strings
Posted: Wed Jun 23, 2004 12:20 am
How do I append strings that contain numbers for their values?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$num = 15;
$text = "Number is: ";
$text = $text . $num; //or $text .= $num
echo $text; //returns Number is: 15Code: Select all
<?php
$foo = 123;
$bar = 'jerry';
$baf = $foo.$bar;
echo $baf;
?>