unemployment Posted March 22, 2011 Share Posted March 22, 2011 Why won't '../stuff.com' concatenate? <?php echo '<img src="', '../stuff.com'.getUserAvatar($post['username']), "\" class=\"avatar small\" title=\"${displayName}\" alt=\"${displayName}\" />"; ?> Link to comment https://forums.phpfreaks.com/topic/231333-wont-concatenate/ Share on other sites More sharing options...
requinix Posted March 22, 2011 Share Posted March 22, 2011 1. Did you copy and paste your code, or re-type it? 2. What is happening that makes you think it's behaving incorrectly? Link to comment https://forums.phpfreaks.com/topic/231333-wont-concatenate/#findComment-1190622 Share on other sites More sharing options...
Zurev Posted March 22, 2011 Share Posted March 22, 2011 1. Did you copy and paste your code, or re-type it? 2. What is happening that makes you think it's behaving incorrectly? For testings sake, try: <?php echo "<img src=\"../stuff.com".getUserAvatar($post['username'])."\" class=\"avatar small\" title=\"$displayName\" alt=\"$displayName\" />"; ?> Link to comment https://forums.phpfreaks.com/topic/231333-wont-concatenate/#findComment-1190623 Share on other sites More sharing options...
unemployment Posted March 22, 2011 Author Share Posted March 22, 2011 sorry guys. My mistake. It's concatenating I was just looking at the wrong line of code. Now id I could only get the path right. I am in the process of making an admin panel. Can you reference files in a subdirectory from you main directory? Link to comment https://forums.phpfreaks.com/topic/231333-wont-concatenate/#findComment-1190632 Share on other sites More sharing options...
unemployment Posted March 22, 2011 Author Share Posted March 22, 2011 I wanted to do this, but it fails... ../mysite.com/assets/img/avatars/defaultuser.jpg Link to comment https://forums.phpfreaks.com/topic/231333-wont-concatenate/#findComment-1190633 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.