Php Intern
Php Intern Interview Questions and Answers
Q1. Write html and CSS code to make a card
Create a card using HTML and CSS
Use
element to create the card containerStyle the card using CSS properties like background-color, border, padding, and margin
Add content inside the card using
tags for text and tag for images
Q2. Diff between require and include
require and include are both used to include external PHP files, but require will cause a fatal error if the file is not found, while include will only produce a warning.
require is used when the included file is essential for the script to run
include is used when the included file is not essential for the script to run
require_once and include_once are used to prevent multiple inclusions of the same file
require will stop the script execution if the file is not found, while inc...read more
Php Intern Interview Questions and Answers for Freshers
Q3. Difference between require and include
require is a fatal error, include is a warning
require will produce a fatal error if the file is not found, include will only produce a warning
require is used when the file is essential for the script to run, include is used when the file is not essential
require_once and include_once are similar but ensure the file is only included once
Q4. Diff between echo and print
Echo and print are both used to output text in PHP, but echo is faster and can output multiple values at once.
Echo is a language construct, while print is a function.
Echo can output multiple values separated by commas, while print can only output one value at a time.
Echo does not return a value, while print returns a value of 1.
Echo is faster than print because it does not need to return a value.
Example of echo: echo 'Hello World';
Example of print: print('Hello World');
Q5. SQL joining for three tables
SQL joining for three tables involves using JOIN statements to combine data from multiple tables based on common columns.
Use JOIN statements to connect the tables based on common columns
Specify the columns to be selected from each table
Use aliases for table names to make the query more readable
Consider using different types of joins like INNER JOIN, LEFT JOIN, RIGHT JOIN, or FULL JOIN based on the requirement
Q6. Print * using loops
Printing * using loops is a basic programming exercise.
Use nested loops to print * in a pattern
Use a for loop to print * in a straight line
Use a while loop to print * until a certain condition is met
Share interview questions and help millions of jobseekers 🌟
Php Intern Jobs
Interview Questions of Similar Designations
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month