Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:47:30+00:00 2026-06-03T10:47:30+00:00

please check the following code. $imagebaseurl = ‘support/content_editor/uploads/$name’; The $imagebaseurl is a variable that

  • 0

please check the following code.

$imagebaseurl = 'support/content_editor/uploads/$name';

The $imagebaseurl is a variable that is containing a link to my image folder (uploads) and inside the folder I have some other folders which are named after my users name. for example: I have a user who’s name is john, so the the link should look like this-> support/content_editor/uploads/john.

The main idea is when any user is logged in and browses his image gallery I want to take him to his own gallery which basically is named after his name.

When he will visit the gallery the value of $name in the link will come from the user’s login name (from session). Now the problem is as you probably have already understood that the placement of $name in the above link is wrong and that is why it is not working. I am getting this whole URL> (support/content_editor/uploads/$name) instead of (support/content_editor/uploads/john)

Now could you please tell me how to use the $name in this $imagebaseurl = 'support/content_editor/uploads/$name';

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:47:31+00:00Added an answer on June 3, 2026 at 10:47 am
    $imagebaseurl = 'support/content_editor/uploads/' . $name;
    

    or

    $imagebaseurl = "support/content_editor/uploads/{$name}";
    

    Note that if you use double quotes, you can also write the above as:

    $imagebaseurl = "support/content_editor/uploads/$name";
    

    It’s good though to get in the habit of using {$...} in double quotes instead of only $..., for times where you need to insert the variable in a string where it’s not obvious to PHP which part is the variable and which part is the string.

    If you want the best performance, use string concatenation with single quotes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please check out my following code... public enum LogType { Debug, Info, Warn, Error,
Please check the following sample code. Toast messages are shown but the progressdialog is
Please help check the following code: running it on linux encountered segmentation fault. #deinf
I want to choose images from the Gallery. Please check the following code. public
Please check out my following code String jsonString = writer.toString(); JSONObject jsonObj = new
Please check following code DateTime? tmp = new DateTime(); tmp = null; return tmp.ToString();
Please check the following code. I want to print array, but it only print
Please check the following code #include <stdio.h> #include <string.h> #include <stdlib.h> #include <termios.h> #include
Please check the following section of code (Simplified version) my concern is in the
I have the following code that will check to see if the div text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.