How can I take two characters of a string

how can i start two characters of a string regardless of the length of the string.

+2


a source to share


1 answer


FROM substr()



$string = substr("something", 0, 2);

      

+3


a source







All Articles