 Hey everybody, this is Brian and welcome to the 8th Lamp Tutorial. Alright, let's dig right in. Let me close that, there you go, from template, and we're just going to say, whoops, got a little ahead of myself there. Unfortunately, I cannot type, think, and pet my cat all at the same time. Alright, so we have our beautiful PHP document here, and we're going to play around with variables a little bit more. Some of you that know multiple programming languages like myself, this is going to be old school, but if you're brand new to PHP, this is going to be an invaluable resource. So, last tutorial, we learned what a comment is, meaning this will not get processed. That's helpful for you understanding what you're doing. For example, let's make a couple variables here, let's say, boy equals Bob, and let's pick another variable called girl, equal Sally. Go away kitty, daddy's trying to record. If you've been watching my tutorials, I know it's kind of a running joke, these cats. I mean, I'm invisible to them until I sit down to record, and then suddenly they want my attention. Some people say it's because I'm on the computer, it doesn't matter. I could be doing my taxes on the computer, playing a video game, writing code, they leave me alone the minute I start recording, boom, they're right there. Some people say it's because I'm talking. No, I typically talk to myself all the time. It sounds like a crazy person. Anyways, so we've got two variables, boy equals Bob, girl equals Sally. Did I just say Sally? I did Sally, sorry. So remember, because they're strings, you cannot say boy plus or boy, and we have to do boy dot. You guessed it. All right, let's preview this. Whoops. I'm sure there's a very quicker, easier way of doing this preview in Komodo Edit, but admittedly, I really have not had the time to explore all of the features this program has to offer. There we go. I tend to like it on top there. Yeah, that did something bad, didn't it? So we got Bob Sally. Let's actually kill that. There we go. Now everything's set up what we want. But notice how there's no space in the center there. Fix that. Simply put a space in there. So that's how you concatenate strings. Now what if we're not working with a string? For example, let's say x equals 2, and let's say y equals 10, nice even numbers. And we want to echo out x plus y. Notice how it has 12 in there, which you probably echo out a hard return here. Whoops. One thing I like about an ID is it'll tell you if you screwed up, you see that squiggly line? PHP parser error, syntax error, unexpected variable, et cetera, et cetera. What that means is I simply forgot that semicolon. Remember that pesky semicolon I've been warning you about? So x, which is 2, plus y equals 10. So as you can see, variables are very, very handy tools because you can do things with them. For example, you can say Bob Sally. I don't know how those two correlate, but you've concatenated a string. You can do mathematics, things of that nature. I'm sure you've seen different forms like on Google where you type in a search. That gets turned into a variable on the server side. Pretty simple to understand, but hard to really grasp and concept until you see it. The first time you tried explaining a variable to someone, they just give you the deer head lights look. So now we have a bunch of variables. Let's do something with them. For example, let's say we want to take x plus y. We want to make another variable, and we'll call this, let's call z, let's also echo this out again. Oops, forgot my semicolon. Geez, I lectured you guys on that. So as you can see, we're echoing out x plus y, which is 12, but we can also make a variable called z, and it equals the value of x plus y, which is, of course, 12. To make that a little more clear, let's actually multiply it instead of add them together. There we go. So now we've got our 12 and our 20. Now you're starting to see the power of variables. You can actually assign things in memory and then manipulate them as you see fit. So that's all for this tutorial. Thank you for watching. I hope you enjoyed this video. I'll see you next time. Bye. Bye. Bye.