Sergey Defactov2017-04-06 17:43:28
Sergey Defactov, 2017-04-06 17:43:28

2 php functions in echo?

How to display 2 functions in a row
now there is a post text output without html characters using strip_tags

<?php echo strip_tags($wo['story']['postText'], '<p><iframe>');?>
you need to add cropping to the length of the text through
mb_substr($wo['story']['postText'], 0, 156, "utf-8"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Maxim Timofeev, 2017-04-06

And what for all in a line to pull?

$text = $wo['story']['postText'];
$text = strip_tags($text, '<p><iframe>');
$text = mb_substr($text, 0, 156, "utf-8");
echo $text;

alex stephen, 2017-04-06

<?php echo mb_substr(strip_tags($wo['story']['postText'], '<p><iframe>'), 0, 156, "utf-8");?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question