Echo / Print

To get output in php and codeigniter  framework we use Echo , Print or Print_r().

1. echo and print is used to print string

example :  echo "Hello wolrd ";
                  print "Hello world";

output :
                 Hello World
                 Hello World


2. print_r( ) function used to print the array

example :  $a = array("Jhon", "Cena", "America");
                  print_r($arr);
 
output :     Array ( [0] => Jhon[1] => Cena[2] => America)





Reviewed by Admin on May 02, 2020 Rating: 5

No comments:

Powered by Blogger.