php substr – The Best PHP 3 Examples

Today, We want to share with you php substr.In this post we will show you php string length, hear for
php indexof
we will give you demo and example for implement.In this post, we will learn about PHP Check If String Contains Substring with an example.

php substr

Example : 1

';
echo substr($marketing1,1);
echo '
'; echo substr($marketing1,1,5); echo '
'; echo substr($marketing1,0,10); echo '
'; echo substr($marketing1,-1,1); echo '
'; ?>

Example : 2

';
echo substr($marketing1,0,-1);
echo '
'; echo substr($marketing1,3,-3); echo '
'; echo substr($marketing1,4,-4); echo '
'; echo substr($marketing1,-3,-2); echo '
'; ?>

Example : 3

';
echo substr($marketing1,-1);
echo '
'; echo substr($marketing1,-4); echo '
'; echo substr($marketing1,-5,1); ?>

Use the PHP substr() function




    Example of Extracting Substring from a String in PHP



";

echo substr($market, 0, -7);
echo "
"; echo substr($market, 0); echo "
"; echo substr($market, -6, 5); echo "
"; echo substr($market, -6); echo "
"; echo substr($market, -12); ?>

I hope you get an idea about php substr.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment