$variable = $variable


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

Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a really simple way of doing the following:

$animal_dog = $something_something[$i]['animal_dog'];
$animal_cat = $something_something[$i]['animal_cat'];
$animal_cow = $something_something[$i]['animal_cow'];
etc, etc, etc

Is there a way to simplify the process above so that I could just do:

$animal_* = $something_something[$i]['animal_*'];

I hope this makes sense and thanks in advance... this would be so handy to know how to do!

Thanks

No comments posted yet

Your Answer:

Login to answer
130 Like 53 Dislike
Previous forums Next forums
Other forums

Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to

PHP switch function help
Hi, I am trying to create a search function for a directory website. On the search function on html

Which practice of iteration through containers is preferred
In the "real world" what kind of loop do most people use to iterate through a container like a vecto

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

Consuming MII WebService in Java WebDynpro
Hello,

We are facing a strange situation...

We define a transaction in MII to

Cloud Computing?
Hello,

I was wondering if anyone could help explain this term to me. I'm starting to hear it

Format String help
I have a textbox where a person enters an application number. the application number is 10 characte

Can't seem to capture a variable in a chained select
I'm *this* close to having a chained select running but for some reason it doesn't seem to be pickin

How can use this array as a key?
Say I have this array for example:


print_r($array);

Prints:
Code: [Select]Array

preg_replace question
Hello!!

I hope someone can help me with preg_replace.

I load two tables from an extern

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