Thread TagsAdobe Illustrator Adobe InDesign Adobe Photoshop Android Development Android Programming Android Studio Automation Testing C / C++ Programming Career Options College Lounge css digital marketing Digital Marketing / SEO Fireworks Graphic Design Graphic designing Graphics Design Graphics Designing HTML? Illustrator Internship Training logo Design logo designing Magento Photoshop PHP Programming QA react-native Scroll Website SEO Single Page Website Stock Managment System Testing Typography UI UI/UX Development UI Design UI Designing UI development User Interface UX Design Web Designing Website Design Wordpress wp
Log in with your username and password
Register for free!
Registration at Smart Mentors is completely free and takes only a few seconds. By registering you’ll gain:
- Full Posting Privileges.
- Access to Private Messaging.
- Optional Email Notification.
- Ability to Fully Participate.
This thread contains 3 replies, has 4 voices, and was last updated by Anonymous 2 years ago.
- Author Replies
- January 2, 2018 at 4:24 pm #34796
echo and print are more or less the same. They are both used to output data to the screen. The differences are small: echo has no return value while print has a return value of 1 so it can be used in expressions. echo can take multiple parameters (although such usage is rare) while print can take one argument.
For Example :-
echo “This “, “string “, “was “, “made “, “with multiple parameters.”; //this is valid
Print “This “, “string “, “was “, “made “, “with multiple parameters.”; // this is not valid
- AnonymousDecember 25, 2018 at 3:00 pm #50599
In a nutshell, echo and print both are PHP Statement.
Both are used to display the output in PHP.
1. It can be used with or without parentheses;
2. echo can pass multiple strings separated as ( , );
3. echo doesn’t return any value
1. Print can don’t pass multiple arguments
2. Print always return 1
3. It is slower than echo
Hope this helps!
You must be register. Registration is 100% free.to reply to this thread.Please or