Working with Substrings in PHP, Substring Built-In Functions, Find Matching String in PHP Codecademy

In this PHP programming tutorial we take a look at Working with Substrings in PHP, Substring Built-In Functions, Find Matching String in PHP Codecademy. This is based on the Codecademy “Learn PHP” course. We are in the section, “Intro to Built-In PHP Functions” section, and the lesson is “Working with Substrings”. In this lesson, we begin to look at functions that work with PHP substrings. We learn that a substring is a portion of a string or a string within a string. We are able to use the substr_count() function that will return the number of times a substring is found within a string we specify. Learning about how to work with PHP substrings will aid you in your programming journey! Make sure to practice working with PHP substrings to truly begin to understand the power behind string substring functions in PHP. In this lesson, we take a look at substr_count() which allows us to see how many times a substring appears in a string we provide the function. Learning how to work with substrings in PHP is key to becoming a well-rounded PHP developer. Understanding that substr_count() function will count any instance where the letters all appear so if we search for a word like “obvious” then it will register a count for the word “obviously” as well since it begins with the keywords we are searching for. Make sure to practice working with PHP substrings and have a clear understanding before moving on to the next lesson!