Getting a part text of a string

Posted by exemedia | 1:34 AM | | 0 comments »
KODE PPC ANDA

To get part of a string in PHP, we use a substr() function.
Syntax:

substr(string,start,length)

example:

$str = "Welcome";
$part_str = substr($str,0,3);
echo "$part_str";

Result:
Wel

KODE PPC ANDA

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Related Posts by Categories



Widget by Hoctro | Jack Book

0 comments

Post a Comment