How to combine two variables to make one?
Posted: Sat Apr 19, 2008 8:14 pm
need to create one variable by combining two with an underscore between them, then post the new one to a field in the data table. Want to create ' bob_799' from the code below, but this isn't working...
only prints the underscore.
I don't exactly understand the proper use of quotes and periods in queries, so have been experimenting, but no luck so far..
how to write it properly?
any help appreciated in advance..
thanks,
mc
Code: Select all
$user_id = "bob";
$license_num = "799";
$string= "$user_id"._."$license_num";
echo "$string";
I don't exactly understand the proper use of quotes and periods in queries, so have been experimenting, but no luck so far..
how to write it properly?
any help appreciated in advance..
thanks,
mc