php - How I can replace <br /> with " " in a function -
<?php function show(){?> <?php echo "a"; ?> <br /> } //this function in file <?php echo str_replace("<br />"," ",show());//search <br /> ?>
how can replace <br />
" "
?
you need buffer output. similar this:
ob_start(); show(); echo str_replace("<br />", " ", ob_get_clean());
Comments
Post a Comment