PHP program to print identity matrix

Prem Tiwari - - PHP Tutorials


This is a basic PHP program to print identity matrix. Below examples will help you in the better understanding of the basic concept of PHP programming language.

PHP program to print identity matrix

Copy below program and execute it with PHP compiler to see the program output.

Output:

1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1