$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

Buggy registration system
Hey, I just started scripting in PHP, and I ran into a few problems.
Code: <?php
includ

problem when runing a funciton
I am trying to connect to database using a funciton in a functions.php

<?php
funct

replacements
I have a variable in my PHP script like

ASSFDDDDDDDDDDDDDASDDDDDDDDARYTRHKKHHHHHHHHHHH and p

Ariba 9r - SAP MM Integration
Hi experts,

The standard Ariba adapter for 9r creates a relationship between Cost Centers

C - Reading a file into a byte array
Hi,

I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru

mysql_real_escape_string making variable equal nothing
i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i

creating a 1 to 100 in a table
hi guys I am a newb in php need some help.

I have a table with 1 column and 100 rows and in

styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those.

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

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