$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

passing an array of objects after submit
How do I do this? This is what I have tried and it is not working.

<form method="

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

php global variable
how can we create global variable so we can use its value in any form.. Please give example to

Escaped characters
I have a script that allows you to post news to the home page of my site. Along with the news is the

mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:

Code

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

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

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

adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit numbe

Help: problem with Headers to download PDF file
Hi,

I'm trying to implement a script where when a user clicks a link he gets a PDF file to op

Insert to MySQL inside foreach
Hey.
I am parsing some html, and putting inside an html db.
I need to create a randomized inte

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