PHP allows several different types of variables. For this PHP exercise, you will
create one variable and assign it different values, then test its type for each value.
Write a script using one variable “$whatsit” to print the following to the browser. Your echo statements may include no words except “Value is”. In other words, use the function that will output the variable type to get the requested text. Use simple HTML to print each statement on its own line and add a relevant title to your page. Include line breaks in your code to produce clean, readable HTML.
Value is string.
Value is double.
Value is boolean.
Value is integer.
Value is NULL.
Your script should look similar to the following. Of course, the values you assigned to your variables are unlikely to be the same, but using the gettype() function, the output will match as long as the data types are correct.
The \n creates a line feed. It doesn't affect the output to the browser, but it does make the source code easier to read. If you leave it out and look at the HTML source in your browser, you will see that the lines all run together.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"