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 8973457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:27:05+00:00 2026-06-15T18:27:05+00:00

In Flash (AS2) you can add strings like so: variable = a+b and the

  • 0

In Flash (AS2) you can add strings like so:

variable = "a"+"b"

and the result will be a a string with the value of “ab”.

I understand this (concatenation of strings) is done with the “.” operator in php, but I’m wondering whether it’s possible to do this when you pass an argument?

Specifically, what I’m trying to do is this:

$o = get_post_meta($id, 'locationForDay'.$i, true);

Where “get_post_meta” is a wordpress function for getting custom data attached to a blog post. (I’m trying to fetch a bunch of variables called ‘locationForDay1″, “…2” and so on in a loop)

(I have tried it out and got an error, but I’m not sure whether it’s based on this or other mistakes in my amateur-ish php)

  • 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-15T18:27:06+00:00Added an answer on June 15, 2026 at 6:27 pm

    your following statement will work fine:

    $o = get_post_meta($id, 'locationForDay'.$i, true);
    

    Although, if you are unsure you can always throw parenthesis around a string:

    $o = get_post_meta($id, ('locationForDay'.$i), true);
    

    Edit: It should be worth noting that it is possible to concatenate strings using a comma (,). Therefore the following statement would NOT work:

    $o = get_post_meta($id, 'locationForDay',$i, true);
    

    Whereas, the above statement would call the function get_post_meta and contain 4 arguments. In this instance it would be crucial to include the parenthesis in order to achieve your string concatenation:

    $o = get_post_meta($id, ('locationForDay',$i), true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Any existing Flash SWF compilers that can understand directives like #IF #ENDIF , etc?
Is it possible to convert a float to a currency string in Flash AS2?
I'm trying to be responsible with my DOM references in this little Flash 8/AS2
I'm fairly new to JS but am familiar with AS2(Flash). In Flash I can
I have a simple AS2 search form done in flash, the issue I'm seeing
I'm really struggling with this. I have a flash demo built in AS2 (not
I am using Flash(as2 or 3 doesn't matter). I would like to know the
I have two Flash banner ads, built in CS5.5, using AS2, that will be
I'm loading a flash MovieClip (Test.swf) like below. The problem is I can't read
I was working with javascript and flash communication with AS2 using ExternalInterface. This works

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.