PHP Tutorial : Substract part of string with substr
Apr 10, 2009 Basic PHP
Hello,
I didn’t posted for a long time because I am simply stucked into finding a subject. I made a search into my own blog and I saw that (miraculous btw) I didn’t writed yet about substr function which helps you to print only a part of a string – substract it!
<?php $stringIs = "mystring"; $substract = substr($stringIs, 0, 3); print $subtract; //this will print my ?>
First you declare the string you want substracted, then first number means from where to start and the last no. means where to finish.
Taddaaa!
Tags: php part of a string, php substr, php substract part of a string, substr


November 17th, 2009 at 6:45 am
would it be too much to say that the world is in devil’s hand aslong as man does not trust in his own ratio?