473,508 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Concatenate variables

I have 3 inc. files where I keep names of series in different
languages. For example:
$series_1 = 'kdfkd';
$series_2 = 'fdgdgd';
$series_3 = 'hdssasd';

In my database I count how many different series there are (In the
database I have different elements that belong to series). I want to
make a link for every serie. So I use a for loop:
for ($i = 1; $i <= $total_series; $i++) {
...
...
<a href="paintings.php?lang=<? echo $lang?>&code_series=<? echo $i
?>" target="_blank"><? echo $series_.$i ?></a> -> this last part is the
problem!!!!
}
How can I write the reference to the serie name in the inc. file.
That's to say, how can I concatenate $series_ and the value of $i????

Thanks. Bettina

Jul 29 '05 #1
2 4359
be*****@coaster.ch wrote:
I have 3 inc. files where I keep names of series in different
languages. For example:
$series_1 = 'kdfkd';
$series_2 = 'fdgdgd';
$series_3 = 'hdssasd'; How can I write the reference to the serie name in the inc. file.
That's to say, how can I concatenate $series_ and the value of $i????


You mean like this:

$series_1 = 'kdfkd';
$series_2 = 'fdgdgd';
$series_3 = 'hdssasd';

$i = 2;

echo ${'series_'.$i}; // echo 'fdgdgd'
Jul 29 '05 #2
GENIAL! Thank you!!!!

Jul 29 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
22833
by: Jay Chan | last post by:
I am trying to export data from a SQLServer database into a text file using a stored procedure. I want to be able to read it and debug it easily; therefore, I want all the columns to indent nicely....
2
9836
by: learning_C++ | last post by:
Hi, I have two variables. One is string "s" and the other is float "f". I hope to concatenate them and get a new string. I tried s=s+f. But it failed. Please help me. Thanks.
30
26973
by: priya | last post by:
Hi How to concatenate two integer Values. Example Program : #include "Port.h" #include "BinaryConversion.h" # include "iostream.h"
3
7158
by: Bosconian | last post by:
I have form values stored in an object. I have a set of numbered form fields: specialty1 specialty2 specialty3 I need to loop through these, check for content and process accordingly. I...
0
2134
by: Luis Esteban Valencia | last post by:
Hello I am in big troubles trying to concatenate this I have a datalist Private Sub llenardatalistpartidos(ByVal idfase As Int32, ByVal iddeporte As Int32) Dim dr As sqldatareader dr =...
14
2321
by: J.S. | last post by:
In a Windows Form application, which is the better method to concatenate large blocks of code? 1. Reading the text from text files. 2. Adding the text to the VB file itself? Thanks! J.S. ...
6
4296
by: Sheldon | last post by:
Hi, I am trying to build a large array using concatenate function in python. So as I loop over the number of arrays, of which there are 12 (4 down and 3 across), I create 3 long arrays by...
14
27154
by: metamorphiq | last post by:
Hello, I'm a Java programmer, so I'm probably asking a very simple question here, but I have trouble solving it :) I'd like to know how you concatenate multiple (4, in my case) char* in C++,...
10
7420
by: Aaron Hoffman | last post by:
Hello, I'm hoping someone might be able to offer some guidance to my problem. I have one query in MS Access which consists of 2 tables joined by a SEQUENCE_ID. By joining the two tables I am...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.