Guest saumil Posted February 3, 2006 Share Posted February 3, 2006 Hi, I am yeat learning PHP so please go slow on me I know this is just too silly but I can figure it out <?php $firstname = "Jack"; $secondname = "Dawson"; ?> How do I display then both under 1 variable $fullname where if I echo $fullname it should print as Jack Dawson? Best Regards Quote Link to comment Share on other sites More sharing options...
convict Posted February 3, 2006 Share Posted February 3, 2006 WITHOUT VARIABLE echo "$firstname $lastname"; WITH A VARIABLE $fullname = "$firstname $lastname"; echo $fullname; ---------------------- Alternate and prefered variable content $fullname = $firstname . " " . $lastname; Quote Link to comment Share on other sites More sharing options...
Guest saumil Posted February 3, 2006 Share Posted February 3, 2006 Alternate and prefered variable content $fullname = $firstname . " " . $lastname; That is exactly what I was looking for. Thanks a bunch! Quote Link to comment Share on other sites More sharing options...
convict Posted February 6, 2006 Share Posted February 6, 2006 Happy coding ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.