Putting Text Into Variables
In the past area, you perceived how to place numbers into factors. Be that as it may, you can likewise place content into your factors. Assume you need to know something about the coats you claim. Is it true that they are Winter coats? Coats? Summer coats? You choose to list this, also. You can put coordinate content into your factors. You do it correspondingly to putting away numbers:
$coats1 = "Winter Coats";
Once more, our variable name begins with a dollar sign ($). We've then given it the name coats1. The equivalents sign takes after the variable name. After the equivalents sign, in any case, we have coordinate content - Winter Coats. Be that as it may, see the twofold quotes around our content. In the event that you don't encompass your immediate content with quotes, at that point you'll get blunders. You can, in any case, utilize single statements rather than twofold statements. So you can do this:
$coats1 = 'Winter Coats';
Be that as it may, you can't do this:
$coats1 = 'Winter Coats";
In the above line, we've begun with a solitary statement and finished with a twofold statement. This will get you a blunder.
We can store other content similarly:
$coats2 = "Coats";
$coats3 = "Summer Coats";
The immediate content will at that point get put away in the variable to one side of the equivalents sign.
Along these lines, to recap, factors are capacity zones. You utilize these capacity regions to control things like content and numbers. You'll be utilizing factors a considerable measure, and on the following couple of pages, you'll perceive how they function practically speaking.
No comments
Post a Comment