Reputation: 151
I currently have a variable setup in one php file:
<?php
$images_url = "http://foo.bar.com/helloworld/images/";
?>
I have a different file in which I have an array. Here's a snippet of the array:
'image' => '<img src="urlencode($images_url);/news/20140528.jpg" />';
I'm guessing urlencode()
is not the correct tool, but it's the most recent one I've tried.
PS. Please excuse any formatting issues, as this was composed on my phone.
Upvotes: 1
Views: 56
Reputation: 1455
try this
'image' => '<img src="' . urlencode($images_url) . '/news/20140528.jpg" />';
Upvotes: 0
Reputation: 3577
Try the following instead:
'image' => '<img src="' . urlencode($images_url) . '/news/20140528.jpg" />'
Upvotes: 1