Substring Use In php or codeigniter.
If your data store in variable ==> $testimonials['content'] .
You want to show in 100 words When you use substr() function .
like as
$a ="Hell fr. I am a web-developer. I can create many site in php or wordpress... "
then you want to show only 15 Words show in your post.
Then you use substr function
like as ;;;
substr($a, 0, 15) ;
0, to 15 means you want to show only 1st to 15th words ok...
other word..
<td><?= substr($testimonials['content'], 0, 70) ?></td>
then you use 70 charactor in your post...
Thanks.
If your data store in variable ==> $testimonials['content'] .
You want to show in 100 words When you use substr() function .
like as
$a ="Hell fr. I am a web-developer. I can create many site in php or wordpress... "
then you want to show only 15 Words show in your post.
Then you use substr function
like as ;;;
substr($a, 0, 15) ;
0, to 15 means you want to show only 1st to 15th words ok...
other word..
<td><?= substr($testimonials['content'], 0, 70) ?></td>
then you use 70 charactor in your post...
Thanks.
0 Comments