$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

mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

MSSQL/PHP
I am tryint to setup a webapplication developed in PHP, Apache2.0 and SQLServer2000 as backend which

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

DOMDocument
Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a

Why does my crawler script suddenly end with no error?
Hi.

I have written a web crawler script. It will visit a large number of URL's with cURL.

retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

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