To display the data value of a variable or a string, you can use the command echo or print . Different from the second command is a command print can behave like a function so that when you try the following script: <?php $Value = print "Learning PHP"; print $value; ?> Then the value that appears is 1. While the echo command more simple and faster because just write something directly to the browser. There is one more commands that can be used to display data to the screen printf . Command printf is more complex because we can enter values dynamically and displays data of the type that we want. For more details, please try the following script: <?php $p=12345; $s=-12345; $d=12/5; $f=162.67-12; printf ("%d <br>",$p); printf ("%d <br>",$s); printf ("%f <br>",$d); printf ("%d <br>",$f); ?> Run on browser. In the above display, the fourth line should...
Website Pembelajaran Pemrograman dan Info Game Terupdate