$variable $variables type question


Posted on 16th Feb 2014 07:03 pm by admin

I need to be able to designate an array element dynamically, so I thought to use a variable variable, but it doesn't work:
Code: $test = array(1,2);
$num = "[0]";
echo $test{"$num"}; // expecting 1
Not working. Is this possible?

No comments posted yet

Your Answer:

Login to answer
322 Like 52 Dislike
Previous forums Next forums
Other forums

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl

PHP & Images [Resize, Crop, Save]
Hey! Well I have a little dilema, hoping I could find some guidance.

I have a CMS and on the

Problem in back link
I have page where i have given javascript back link but when i click on it browser give a message

How would I protect......
I have a from, actually, a good amount of forms. How can I make it so you can't type the characters:

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

records between 2 dates
Hello all,

I have a date tracked table which contains effective_start_date and effective

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash