djacks89
01-21-2006, 01:08 AM
what's the best way to join values as strings in php? For instanc:
<?php
$name1 = 1111111111;
$name2 ="gordon"
$test1 = substr($name1, 0, 4);
$test2 = substr($name2, 0, 4);
$test3 = $test1.$test2;
echo $test3;
?>
this doesn't seem to work. The output I desire is
1111gord
what is the correct synta.?
<?php
$name1 = 1111111111;
$name2 ="gordon"
$test1 = substr($name1, 0, 4);
$test2 = substr($name2, 0, 4);
$test3 = $test1.$test2;
echo $test3;
?>
this doesn't seem to work. The output I desire is
1111gord
what is the correct synta.?
