phpscripter Posted July 20, 2009 Share Posted July 20, 2009 Hi ! I am learning PHP and MySQL to start as a freelancer. I have gone through different topics but reviewing I came up with a curious question. Which would be the difference between a string and a variable ? Is the variable itself incl. the store data just literal text (string) but with a different function ? Why do I have to put all the strings in "" and the variables in "" also like string="Hello World"; $variable="Hello World"; Which would be the difference ? Thanks guys Reg Quote Link to comment https://forums.phpfreaks.com/topic/166698-can-someone-help-me-please/ Share on other sites More sharing options...
play_ Posted July 20, 2009 Share Posted July 20, 2009 string="Hello World"; is wrong. and in beginner terms.... a string is a literal like "Hello World" A variable holds a string. Quote Link to comment https://forums.phpfreaks.com/topic/166698-can-someone-help-me-please/#findComment-879005 Share on other sites More sharing options...
Maq Posted July 20, 2009 Share Posted July 20, 2009 As far as PHP types you should read: Types. I also advise you to work on a small project or task either by yourself or from a tutorial to get used to the syntax and PHP itself. Quote Link to comment https://forums.phpfreaks.com/topic/166698-can-someone-help-me-please/#findComment-879009 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.