user550265
user550265

Reputation: 3289

php hyperlinks formatting issue

I have the hyperlinks displayed using php as

<a href="<?php echo $object->property; ?>"><?php echo $object->property; ?></a>

The $object-> property returns results on multiple lines separated by semicolon

How can i get the results to get displayed without the semicolon

Upvotes: 0

Views: 47

Answers (1)

xzyfer
xzyfer

Reputation: 14135

You can user str_replace

echo str_replace(';', '', $object->property);

Upvotes: 3

Related Questions