$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:

Did you know?Explore Trending and Topic pages for more stories like this.
$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

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

Login Functionality Working Different on IE
This is an odd one, I have a site which has an admin section. The admin pages unsurprisingly require

insert quotes
Hi,

I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

Why do I get this error?
Error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

Generate PDF
Hi guys,

I would like to know if there is a way to generate pdf when clicking on a link. In f

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