OK easy enough. In context this would be somewhere in the body of your html markup and the actual content would go where I put “content goes here” in the following example…
<?php “content goes here”;?>
Notice the ; which much like other languages runs the function.
In the first chapter alone I have gained the ability to…
- Utilize the php tag properly
- Make comments (but sublime has my back anyways)
- Set variables using $
- Use strings and concatenate them using .
- Handle numbers and operates such as round()
- Use constants using define (CONSTANT,value)
- How to “properly use ‘single’ and /”double/” quotations”
I also learned that I need to use .php over .html when using php like this, and also learned a bit about debugging. I found something interesting too, it sounds like I have to run my site on a server and not local for php to work, I will worry more about that come class time though given the fact I can learn seamlessly on codecademy.
define (FEELING, ‘Happy’)
?reason = ‘I finished my chapter one’
echo “<p>”I am feeling ‘ . FEELING . ‘ because ?reason !</p>