Important PHP string functions

PHP string functions:
In this post we will look at some commonly used functions to manipulate strings.

Note: It is important for Interview questions.




strlen() function in PHP:
The PHP strlen() function returns the length of a string.
The example below returns the length of the string "Welcome to PHP":

Example

<?php

echo strlen("Welcome to PHP"); // OUTPUT: 14

?>

In above example "Welcome to PHP" this parameter passed to strlen() function and we used echo statement so it prints 14 as a output.
Welcome=7
to=2
PHP=3
2 sapces.

strtoupper() function in PHP:
The strtoupper() function converts a string to uppercase.
Example
Convert all characters to uppercase:

<?php

echo strtoupper("Hello WORLD!"); 
// OUTPUT: HELLO WORLD!

?>

strtolower() function in PHP:
The strtolower() function converts a string to lowercase.
Example
Convert all characters to lowercase:

<?php

echo strtolower("Hello WORLD."); // OUTPUT: hello world.

?>

ucfirst() function in PHP:
The ucfirst() function converts the first character of a string to uppercase.
Example
Convert the first character of "hello" to uppercase:

<?php

echo ucfirst("hello world!"); // OUTPUT: Hello world!

?>


ucwords() function in PHP:
The ucwords() function converts the first character of each word in a string to uppercase.
Example
Convert the first character of each word to uppercase:

<?php

echo ucwords("hello world"); // OUTPUT: Hello World!

?>

strrev() function in PHP:
The PHP strrev() function reverses a string:
Example:

<?php

echo strrev("Vanesh"); // OUTPUT: hsenaV

?>

strpos() function in PHP:
The PHP strpos() function searches for a specific text within a string.
If a match is found, the function returns the character position of the first match. If no match is found, it will return FALSE.

The example below searches for the text "world" in the string "Hello world!":

Example
<?php

echo strpos("Hello world!", "world"); // OUTPUT: 6

?>

str_replace() function  in PHP:
 - Replace Text Within a String
The PHP str_replace() function replaces some characters with some other characters in a string.

The example below replaces the text "world" with "Dolly":

Example
<?php

echo str_replace("world", "Vanesh", "Hello world!"); 
// OUTPUT: Hello Vanesh!

?>

strstr() Function in PHP:

Example
Find the first occurrence of "world" inside "Hello world!" and return the rest of the string:

<?php

echo strstr("Hello world!","world");

?>

OUTPUT: world!
The strstr() function searches for the first occurrence of a string inside another string.
This function is case-sensitive. For a case-insensitive search, use stristr() function.
Important: It returns the rest of the string (from the matching point), or FALSE, if the string to search for is not found.

str_repeat() function in PHP:
Repeats a string a specified number of times.

Example
Repeat the string "v" 10 times:

<?php

echo str_repeat("v",10); 
// OUTPUT: vvvvvvvvvv

?>

substr() function in PHP:
The substr() function returns a part of a string.

Example
Return "world" from the string:

<?php

echo substr("Hello world",6); 
// OUTPUT: world

?>

Above php string functions are very important, and important for Interview Questions.


Job Openings at Gatitaa, Pune

Job Openings at Gatitaa, Pune

About Company:
Gatitaa is Pune based IT service provider organization started in mid-2005, and is ISO 9001:2008 certified in January 2014. Gatitaa is achieving the real success of business in website design and development, software development, application development, E-commerce development, SEO/SMO, digital marketing, bulk messages and voice calling, product testing, logo design, brand development and much more. Gatitaa has catered 300+ customers and count is increasing significantly. We understand the requirements and business objectives and recommend a cost effective solution with latest technologies within the deadline. We follow Google standards, W3C standards.

Job Openings:

1. Website Designer

Required Skills: HTML, CSS, bootstrap, javascript, jquery, photoshop, (PHP, MYSQL will be benefitial)

Experience: 0 to 6 months


2. Marketing candidates : MBA, BBA (internship available)

Send resume: contact@gatitaa.com

Visit website: www.gatitaa.com

Services provided by Gatitaa :

1. Website Design / Development
2. Software Development
3. Domain Registration
4. Hosting
5. Social Media Marketing
6. SSL Certificates
7. Bulk Email/ SMS
8. ISO / SSI Certificates
& All Work Related to IT





DBMS interview questions with answers

For FRESHERS:
DBMS interview questions with answers



Question: What is database?
A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

Question: What is DBMS?
It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications.

Question: What is a Database system?
The database and DBMS software together is called as Database system.

Question: What are the advantages of DBMS?
Redundancy is controlled.
Unauthorized access is restricted.
Providing multiple user interfaces.
Enforcing integrity constraints.
Providing backup and recovery.

Question: What are the disadvantage in File Processing System?
Data redundancy and inconsistency.
Difficult in accessing data.
Data isolation.
Data integrity.
Concurrent access is not possible.
Security Problems.

Question: Describe the three levels of data abstraction?
The are three levels of abstraction:
Physical level: The lowest level of abstraction describes how data are stored.
Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.
View level: The highest level of abstraction describes only part of entire database.

Question: What is Object Oriented model?
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.




For Interview questions and answers read these posts:

Most Important iOS Interview Questions:

Tell me about Yourself

50 Important C Language Interview Questions with Answers


After completing IT graduation or IT post graduation

This post is for career guidance for IT students.


After completing your education of IT or computer you are looking for job and you are going start for interview preparation.

Tips for after competing graduation or post graduation for IT students or freshers.

- You should prepare good resume. For resume tips read this post: Resume tips
- Check for spelling errors and grammatical mistake before you take a final copy of your CV as even a small error could cause an embarrassing situation for you.
- You should be ready with your platform. Platform means: in which language or specific field you want to do job. choose specific language. Decide on the basis of your interest. If you are good in coding you will be applying for developer or programmer post. If you want to become tester you have to to good course from reputed training institute.
- Various programming and development technologies exists, like,
Java, PHP, asp dot net, C, C++, Android development, Ios app development, game development, desktop app development, animation, photoshop, web design, web development, etc.
- Choose any one or two from above, and start to practice on the same.
- Start preparing interview questions. For interview questions visit or read this:
- Confidence is one thing, and this will be with you for your success.
- Register on Job Portals, upload your resume on job portals.
- Keep updating your resume on job portal at least weekly.
- Make list of IT companies, and hit the websites of these IT companies, go to career page of these websites and upload resume.
- Find HR email Id of IT companies and send resume with proper subject and message body.
- Be ready to go interview if they call back you.
- Before going for an interview, find out as much information on the company.
- Take guidance of your seniors or friends who are already working in IT companies.
- Don't be frustrated in any case, don't quit, Don't give up in any case.
- Try, try, try,...
- If you are frustrated, don't worry, motivate yourself by reading some good books.
- And you don't have option for doing job, you have to do job.
- Don't quit learning, Don't quit practice.
- Your resume should contain at least one project.
- Freshers need to ready for aptitude test.
- Self motivation is very important.


Most important for freshers:

Tell me about Yourself

PHP: Past, Today and Future

Important:
If you want to learn PHP, for getting job, comment here:
Complete training will be provide relatedto PHP, mysql, PHP framework like CodeIgniter. Full support for Interview preparation.
Complete help for project preparation, to include in resume.

Are you interested to learn PHP?
contact: hellotechnologypark@gmail.com

One PHP developer having 2.6 years exp. will guide you completely. Provide friendly training of PHP.

Gatitaa - Website Development company in Pune

Gatitaa is Pune based IT service provider organization started in mid-2005, and is ISO 9001:2008 certified in January 2014.Gatitaa is achieving the real success of business in website design and development, software development, application development, E-commerce development, SEO/SMO, digital marketing, bulk messages and voice calling, product testing, logo design, brand development and much more. Gatitaa has catered 300+ customers and count is increasing significantly. We understand the requirements and business objectives and recommend a cost effective solution with latest technologies within the deadline. We follow Google standards, W3C standards.


Services provided by Gatitaa, Pune :

1. Website Design / Development
2. Software Development
3. Domain Registration
4. Hosting
5. Social Media Marketing
6. SSL Certificates
7. Bulk Email/ SMS
8. ISO / SSI Certificates
& All Work Related to IT


Company Website:
https://www.gatitaa.com/



Contact for Jobs:
Email : career@gatitaa.com