• Resolved vinceheuser

    (@vinceheuser)


    Here is the template line:
    <?php $record->print_value( ‘bname’ ) ?>, <?php $record->print_value( ‘city’ ) ?> <?php $record->print_value( ‘state’ ) ?>

    How does one trim the spaces off these fields so that the comma is tight?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    The template is not adding spaces between the value and the comma. Could there be a space at the end of the value from the database?

    If you want to make the template trim trailing spaces that may be in the data, you can do something like this:

    <?php echo trim( $record->get_value('bname') ) ?>

    Thread Starter vinceheuser

    (@vinceheuser)

    Problem solved. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trim spaces from field values’ is closed to new replies.