From the course: PHP for WordPress

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Perform a mathematic operation and store it

Challenge: Perform a mathematic operation and store it - PHP Tutorial

From the course: PHP for WordPress

Start my 1-month free trial

Challenge: Perform a mathematic operation and store it

(upbeat music) - [Instructor] To make sure you grasp the basics of PHP in this challenge you will perform a set of mathematical operations and store the results into variables. Store each result from the following equations in an array called results, then at the end print out those results. This is where your No WordPress installation on local will come in handy. In your favorite text editor, in this video I'm using Visual Studio Code, you can go to File, Open, and then find your workspace. So this will be under Local Sites, no-wordpress, app, public, and then you can open the entire public folder. Then you would create a new file in that folder. We can call it solution.php. And here is where you would write the solution. Then in local you would visit the site domain, which for me is no-wordpress.local/solution.php.

Contents