Breaking

Monday, February 10, 2020

PHP Coding Interview Questions and Answers

PHP Coding Interview Questions and Answers
         

Following are the list of coding questions that are generally asked in the interview. These contain basic as well as advanced level PHP Coding interview questions and answers. Here we will try to cover as much as possible.

        For PHP interview questions you can check this link.

        This is the most common question asked in the PHP Interview to draw a Pyramid/Patterns. Here we will look into the different patterns and will try to understand one by one in detail.


1. Program to print * pattern in descending order


Pattern 1:

*  *  *  *  *
*  *  *  *
*  *  *
*  *
*


2. Program to print * pattern in ascending order

Pattern 2:

*
*  *
*  *  *
*  *  *  *
*  *  *  *  *


3. Program to print digits in descending order

Pattern 3:

5  4  3  2  1
5  4  3  2
5  4  3
5  4
5



4. Program to print digits in Ascending order

Pattern 4:

1  
1  2  
1  2  3  
1  2  3  4  
1  2  3  4  5

No comments:

Post a Comment