473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dynamic Array Vars

Below $month takes vals jan,feb,mar,etc
and my array vars are jan_click, feb_click and each of these is an array
and I am trying to generate these at runtime

Expand|Select|Wrap|Line Numbers
  1.  
  2. $mVal = substr($month,0,3);
  3. for($i=0;$i<count($dbs);$i++)
  4. {
  5.   #$str  = "$".$mVal."_click[".$i."]";
  6.   $str  = $mVal."_click[$i]";
  7.   printf("<br> AAA :: %s :: %s ", $str, ${"$str"});
  8. }
  9.  
  10.  
is not working can someone help me out with this plz
Oct 8 '07 #1
1 3383
Atli
5,058 Expert 4TB
Hi.

How is it not working?
Are you getting any errors?
(What is the '$dbs' variable?)

Could you explain a little better what you are trying to do?
Oct 8 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Michelle | last post by:
Hi all, I am trying to store data in a $_SESSION variable (an array), but it reverts to empty every time my page is refreshed (due to a submit button click). I read the answer to the post...
2
by: jerrygarciuh | last post by:
Hello, In this sample script I create an array of objects. Print out their data with print_r().Update their data with a sub called v_set(). Print out data showing the chnages using print_r(). I...
13
by: Dave Smithz | last post by:
Hi there, I have a php script that does some form input validation. As it verifies each field if the field has incorrect data, it appends an error message to an $error array. E.g. if...
1
by: webguynow | last post by:
My Dynamic variables print out, same as strings but aren't the same. They are not correct when using them as DB.connection vars. I was using my own routine, that read in string values from a...
4
by: Alfonso Morra | last post by:
Hi, I'm trying to write a simple generic container. I have the ff: typedef union { long int_val ; char* string_val ; double dbl_val ; void* vptr_val ; }Element ;
0
by: todddeluca | last post by:
I am posting code for calling almost any python function from php, because it seems generally useful. Please feel free to suggest improvements or tell me this has already been done better...
13
by: DL | last post by:
For instance, function addNew(i) { var 'element'&i ... } If possible, how to? Thanks.
1
anfetienne
by: anfetienne | last post by:
i have this code below that i made....it loads vars from txt file splits it then puts it into an array....once in an array it the brings the pics in from the array to create thumbnails and a larger...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.