Strings in PHP7
<?php $var="I Love PHP7" var_dump($var);?>
This is the result. When you use var_dump it returns the value and also the number of characters that are in a string.
string(11) “I love PHP7”
Using Strings With Code in PHP7
You can use strings to hold code in PHP. We have done this a few times already in our lessons. Here is an example.
<?php $string=' <h3>PHP7 Is Awesome</h3> '; echo $string; ?>
When Would I Use String in PHP7?
You will use strings all the time in PHP7. They are used everywhere and practically on every page. Creating a string is simple and easy to use, that may be why we use them so often.
Please like, share and subscribe.
I hope you enjoyed the article. If I was able to help you please consider a tip for the content.
One Time Tip