hi, im new and need a quick help:
<? $var = "bob" print "$vars car" ?>
to give out 'bobs car'
basically i want it to add an 's' character directly after the variable, what do i do?!?!
You can do <? $var = "bob" echo($var."'s car"); ?>
I believe print and echo are similar in this case so you can probably use either
<? $var = "bob" print $var."s car" ?>
Or...
print $var; print "s car";
u could do this:
<?php $var = "bob"; print $var . 's car'; ?>
the . contatenates the value of $var and the string 's car'
For the greatest speed and efficiency (you don't want to drain your computer's processor just trying to print this :-)
<?php $var = "bob"; echo $var.'s car'; ?>
ALWAYS try to use SINGLE quotes (double quotes are if there is a variable that needs a'parsin)