I'm trying to build and display a link in PHP with the code:
$displayLink = "<a href={$feed_url}{$feedName} download>$displayFeed</a>"; echo "<br />$displayLink"; This works fine, and I'm able to click the link in the HTML and follow it - unless $feedName contains a space. Thus, 'shoes' works but 'our shoes' does not. With $fileName = 'shoes' I get the link:
<a href="http://my_site/users/55/shirts.txt" download="">shoes</a> which works fine.
With $fileName = 'our shoes' I get the link
<a href="http://my_site/users/55/shirts.txt" download="">our</a> I've tried putting the $feedName variable in single quotes, as below:
$displayLink = "<a href={$feed_url}{'$feedName'} download>$displayFeed</a>"; echo "<br />$displayLink"; but that gives me the link:
href="http://my_site/users/55{'/our" shoes.txt'}="" download="">our shoes</a> How can I get "our shoes" into the link?
Thanks