Tuesday, 11 February 2014

Print Statement in php

Print Statement
Print Statement

This is a tutorial about print statement. Print statement is not function. In php the two basic constructs to get output are echo which we learn in previous tutorial and print. Print language is constructs in php. In echo we are echoing out users data to screen. Now print do the same work which echo do. Its also printout data on users browser.

Code for Print Statement (screenshot1):-
Print Statement
Code For Print Statement

<?php
print '<strong>Hello!</strong>';
?>


output (screenshot2) :-
Print statement
Print Statement

In this example you will see echo and print does same work.Butprint is older method to output string will echo is works faster for output string of user.echo is tradition way for outputting data into browser.print is slower to use then echo.Print had more characters to write then echo.so in-short its lot better to use echo. The main reason for it its more quicker using less system resources.


No comments:

Post a Comment

Thanks For Comment Will get you Soon..

About Me

Welcome to Extra Tutorials! My name is Mohammed and I am the 22 year writer, website developer, and photographer behind the blog. Thanks for visiting! Tutorials Jackpot… In addition to Developer, I love to develop websites and I love to write. Starting a php Blog was inevitable for me. What began as a simple way to share all of my Tutorials with friends and family has developed into my Part time job.

Mohammed Padela

WHAT IS PHP PROGRAMMING

WHAT IS PHP PROGRAMMING
WHAT IS PHP PROGRAMMING

Follow Us

Popular Posts

Designed ByBlogger Templates