S
S
Sergey Defactov2017-04-06 17:43:28
PHP
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)
M
Maxim Timofeev, 2017-04-06
@cashloveyou

And what for all in a line to pull?

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

A
alex stephen, 2017-04-06
@berezuev

<?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