Echoing a variable comes out with lots of white space
I’m having trouble when I get variables from WP function come out very long. How do I trim that down? trim and substr do not see the spaces before or after. Why is it so long?
<?php $image_alt = trim(get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)); ?> <?php echo $image_alt;?>
when I view the source it looks like this:
" HIPAA compliant Times-2 X2 Rotating Shelving Rotating Cabinet Starter and Add-on "