print

Last updated

What is print?

The 'print' statement in PHP is an in-built function used for outputting one or more strings. Unlike 'echo', it is not a language construct and has a return value. However, it is slower because it uses expressions. The text or numeric data that 'print' outputs can be shown directly or stored in a variable. For instance, to print a string you may use print("Hello, World!");, and for using it with a variable, echo $variable; is suitable.

Free resources to learn print

More in stage 3: Arrays

print: common questions

Can I learn print in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain print in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this print tutorial for beginners?

It is lesson 19 of 120 in the free PHP roadmap, in stage 3, Arrays. If you are new to PHP, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me