How to use print in PHP

In this article I will explain how the print() function can be used in PHP.
  • 1470

print() function in PHP

  • The print() function is used to output one or more strings.
  • The print() function is not a real function, it is a language construct.
  • The print() function is no need to use parentheses with its argument list.




  • string string is required parameter. It is sent to the output for One or more strings.


The following example show to how the print() function can be used in PHP.



<h3 style="color: darkblue;">print() function example in PHP</h3>


    print 'Welcome to'.'<br>';

    print 'C-sharpcorner'.'<br>';

    print 'have a nice day....'.'<br>';

    print 1111.11;






You may also want to read these related articles here
Ask Your Question 
Got a programming related question? You may want to post your question here


More Articles

© 2019 DotNetHeaven. All rights reserved.