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

  • Home
  • SEARCH
  • 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 7432489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:27:56+00:00 2026-05-29T09:27:56+00:00

for example, if i run the code below, $ProgramName is a string not a

  • 0

for example, if i run the code below, $ProgramName is a string not a array which i want. How can i take the value of $cncprograms and add it to $ProgramName retaining the array type?

$ProgramName =@()
$ProgramName = JOHN 
$cncPrograms = DOH 
$ProgramName += $cncPrograms
  • 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-05-29T09:27:57+00:00Added an answer on May 29, 2026 at 9:27 am

    this is what you need:

    $ProgramName =@()
    $ProgramName += "JOHN" 
    $cncPrograms = "DOH" 
    $ProgramName += $cncPrograms
    $programname 
    
    JOHN
    DOH
    

    in your code you are re-assign a string value to the variable:

    $ProgramName = "JOHN" # now the variable is of type string (no more an [object[]] object array)

    that’s way $ProgramName += $cncPrograms give a result of “JOHNDOH”

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

Sidebar

Related Questions

I want code to run whenever I create a new object. For example, see
(the example code below is self-contained and runnable, you can try it, it won't
This PHP code below will take an image and add the word _thumb in
Taking the jQuery framework for example, if you run code like this: $(document).ready(function init()
I wrote the beautiful python example code below. Now how do I make it
in the code below i want to implement the floyd algorithm,the user enter some
I need to run the code sample below so that it works on a
The code below works on a live site but I can't get it to
the code below is working, but I want to make sure it's correct .
In my example code below, is the counter = 0 really required, or is

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.