Skip to content
Advertisement

Add nbsp; in php

I have this

            $output .= '<li class="'. $term->slug .'"><a href="'. $term_link .'"><span>'. » . $term->name .'</span></a></li>';

How can I add a non-breaking space between the » and the term name?

Advertisement

Answer

Try This

<?php
$output .= "<li class='". $term->slug ."'><a href='". $term_link ."'><span> &nbsp; » &nbsp; ".$term->name."</span></a></li>";
?>
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement