foreach result into a single variable


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest => $value) {
echo "Interests: $interest; Value: $value
";}
How do I store the multiple results in a single variable?

No comments posted yet

Your Answer:

Login to answer
329 Like 54 Dislike
Previous forums Next forums
Other forums

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

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

Trouble checking SESSION cookie
I am trying to use $_SESSION cookies to verify admin privileges .
I don't understand why this is

Need help with simple code, back and forward buttons.
Basically, I have a set of pages in a folder, which have the title somephrasehere_09.php, somephrase

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

Passing Arguments to execlp()
I'm writing a program that mimics a unix shell. It's supposed to take commands with arguments and ex

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

[Need Help] php timing issues
I don't know what is going wrong. I need some help with being able to set an image at 9:00am Colorad

Undefined variables
hi
----------------------------------------------------------------------------------------------

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