I am trying to concatenate a field from an RSS feed in WordPress. An example line of data is:
The Scala in London, - David Ford is touring the UK in support of his brand new
album, 'Charge', released in March 2013
It displays using this code:
<?php echo esc_html( $item->get_description() ); ?>
I want it to stop just before the ,
- therefore displaying "The Scala in London"
I have used this code in place of the above code:
<?php echo strstr($item->get_description, "-"); ?>
However it just returns a blank line. What am I doing wrong?