Vedsar India
SAP Interview Questions and Answers
Q1. What is the difference between mysqli_fetch_assoc() and mysqli_fetch_array() ?
mysqli_fetch_assoc() returns an associative array while mysqli_fetch_array() returns both numeric and associative arrays.
mysqli_fetch_assoc() fetches a row from a result set as an associative array.
mysqli_fetch_array() fetches a row from a result set as both an associative and numeric array.
mysqli_fetch_assoc() is faster than mysqli_fetch_array() when fetching only associative arrays.
mysqli_fetch_array() has an optional parameter to specify the type of array to return.
Q2. How can we call parent class constructor in derived class?
To call parent class constructor in derived class, use parent::__construct() method.
Use parent::__construct() method in derived class constructor.
Pass the required parameters to parent::__construct() method.
This will call the parent class constructor and initialize the parent class properties.
Q3. Function by which, we can convert string to array ?
The function to convert string to array is explode().
The function takes two parameters: delimiter and string.
The delimiter specifies where to break the string into array elements.
The function returns an array of strings.
Example: $str = 'apple,banana,orange'; $arr = explode(',', $str);
This will result in an array with three elements: 'apple', 'banana', and 'orange'.
Q4. What is different between front end and back end?
Front end is the user-facing part of a website, while back end is the behind-the-scenes part that handles data and functionality.
Front end is responsible for the design, layout, and user experience of a website.
Back end handles the server-side programming, database management, and server configuration.
Front end technologies include HTML, CSS, and JavaScript, while back end technologies include PHP, Python, and Ruby on Rails.
Q5. What is types of inheritance in php?
There are three types of inheritance in PHP: single, multiple, and multilevel.
Single inheritance involves a child class inheriting from a single parent class.
Multiple inheritance involves a child class inheriting from multiple parent classes.
Multilevel inheritance involves a child class inheriting from a parent class, which in turn inherits from another parent class.
PHP only supports single inheritance natively, but multiple inheritance can be achieved using interfaces.
Exampl...read more
Q6. What is the use of seudo class in css
Pseudo classes are used to define a special state of an element.
Pseudo classes are preceded by a colon (:)
They are used to style elements based on their state or position
Examples include :hover, :active, :first-child, :nth-child
Q7. Something tell about 'meta' tag in html.
The 'meta' tag in HTML provides metadata about the HTML document.
The 'meta' tag is placed in the head section of an HTML document.
It provides information about the character set, keywords, description, and author of the document.
The 'name' attribute is used to specify the type of metadata, while the 'content' attribute provides the value.
Example:
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month