Monday , 25 September 2023
Breaking News
Home > Tutorials > PHP > How to Print Calculation Table in Php

How to Print Calculation Table in Php

In today tutorial I will teach you that how to print table of given value. For example if the given number is 5 then table will look like this

5 x 1 = 5
5 x 2 = 10
and so on

So lets start our tutorials. Look at below code

You can see the code is very very simple. You just store value in $num variable and then with for() loop first you echo $num variable then with . you separate next value then print x then print $i and at last we multiply $i and $num.

On the above code you have to change $num in coding view but the code that I am giving below will get value from user and then print the table of given value. It involves some html tags but logic is same as above.


About Muhammad Faryad

Muhammad Faryad is a professional web application developer. He has been working for 5 years in ICE786 Technologies Pvt. Ltd as a Senior Programmer and Developer. You can contact him on facebook at


  1. good tutorial

Leave a Reply

Ad Test

%d bloggers like this: