$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

Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rew

php redirecting
i wont open a new thread but i have a question about redirecting....
i wonder why my code doesnt

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

PRotect my POST DATA... FROM HTML ATTACKS
I need to like let's say

If a user submit's his Prayer and he put's <meta refresh stuf

noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),

a u

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Keeping data in form
How can I keep whatever I write in the form?

quotes changing
hi all

in my content

opening quotes " changes to “

close qu

C problem struct and string
Hi guys,

This is my first post and I'm hoping the experts here can help me solve my problem.<

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

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