Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PHP TABLES USING HTML Hello! Thank you for any help, I'm super stuck on this and have been doing it for 4 days now. Here's

PHP TABLES USING HTML

Hello! Thank you for any help, I'm super stuck on this and have been doing it for 4 days now.

Here's what I need to do:

Implement a PHP script that creates (12) HTML tables outlining examples of data types and operators like shown in the table below (see the PHP script under the Reading section for some guidance) :

image text in transcribed

I have to make 2 more tables (I have 10 already) that follow that format but that do:

  1. boolean and
  2. boolean or

Here's some of the code I have right now so you know what I'm working with:

$a = "abc";

$b = "xyz";

$res = ($a == $b) ? "True" : "False";

print("Table showing equals :");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

variable \$avariable \$bequals (==)
float$a$b$res
");

$res = $a . $b;

print("Table showing concatenation :");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

");

print("

variable \$avariable \$bconcatenation (.)
float$a$b$res
");

I tried the booleans myself dozens of times, and I either get nothing to show up in the 4th box of the table, OR no matter what I do I get a 1 (I need it to say true or false, not 1 or 0) and it's always a 1, even if I have an int and a string or two different int numbers, etc. I had help on a portion of this already and it's bumming me out I can't figure out how to make the booleans work now, too. As long as the code follows the same formats I have up above (we're only in week 4, and this is how our professor wants us to do it, even if there is an easier way to do it with different PHP). If it's easier to use an echo print for it, that would work too as long as it looks like this:

echo "

variable \$x

variable \$y

addition (+)

integer

$x

$y

$res

";

Thank you so so much again for any help!

table showing how to use + with integers variable $x variable $y addition (+) integer 7 15 12 Result of $x+$y table showing how to use + with float variable $x variable $y addition (+) float 2.5 5.33 7.83 Value of $y

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions