variable and array

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Fri May 17, 2013 10:40 pm

variable and array

Postby mohsenmatrix » Fri May 17, 2013 10:41 pm

hello! i want to make a php code for simple poll with Drop down my php file when i increase y_value and echo i other side i see y_value didn't change!help me!
php file:

Code: Select all


   function add(&$poll,&$first,&$second){
            foreach($poll as $x=>$x_value)
                     foreach($x_value as $y=>$y_value)
                         echo $first."<br />";
         foreach($poll as $x=>$x_value)
            foreach($x_value as $y=>$y_value)
           echo "Key=" . $x." value ".$y_value ;
           echo "<br>";

and this is my html file:

Code: Select all

<!DOCTYPE html>
<style type="text/css">
      margin:5px auto;
<body dir="rtl">
<div id="pollform">
<form action="register.php" method="post">
which books you want?
   <select name="activity">
      <option value="programming">programming</option>
      <option value="logical">logical </option>
      <option value="automata">automata</option>
      <option value="compiler">compiler</option>
   <br />
what time?
   <select name="time">
      <option value="1">8-9</option>
      <option value="2">9-10</option>
      <option value="3">10-11</option>
      <option value="4">11-12</option>
<br />
   <input style="padding:10px; font:14px tahoma bold;" value="send" type="submit">

Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot], Xenoforeks and 2 guests